From: Ruben Beltran del Rio Date: Tue, 18 Jul 2023 20:14:03 +0000 (+0200) Subject: Add basic coc config X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/commitdiff_plain/70c7322a3c968fef2d326a179b93807fee83df0f?ds=inline;hp=a094d6d601b6f89a6f13adf54e39178584fad13e Add basic coc config --- diff --git a/config/nvim/coc-settings.json b/config/nvim/coc-settings.json index d80fb1c..9be6d48 100644 --- a/config/nvim/coc-settings.json +++ b/config/nvim/coc-settings.json @@ -1,3 +1,4 @@ { - "svelte.enable-ts-plugin": true -} \ No newline at end of file + "svelte.enable-ts-plugin": true, + "suggest.noselect": true +} diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 994ebef..7601d68 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -26,7 +26,6 @@ vim.opt.smartcase = true -- Unless we use both cases in searc -- Autocomplete Behavior vim.opt.wildmode = 'list:longest,list:full' -- Autocomplete common matching string - -- first, and then the full match. -- Folding Behavior vim.opt.foldmethod = 'syntax' -- Use syntax highlight to define folds @@ -122,5 +121,20 @@ vim.keymap.set('n', 'g', ':Goyo==') vim.keymap.set('i', 'g', ':Goyo==gi') vim.keymap.set('v', 'g', ':Goyogv=gv') +-- CoC +vim.keymap.set('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true, silent = true}) +vim.keymap.set('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true, silent = true}) +vim.keymap.set('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true, silent = true}) +vim.keymap.set('i', '', 'coc#refresh()', {expr = true, silent = true}) +vim.keymap.set('n', 'K', ':call CocActionAsync("doHover")', {silent = true}) + +vim.keymap.set('n', '[g', '(coc-diagnostic-prev)', {silent = true}) +vim.keymap.set('n', ']g', '(coc-diagnostic-next)', {silent = true}) + +vim.keymap.set('n', 'gd', '(coc-definition)', {silent = true}) +vim.keymap.set('n', 'gy', '(coc-type-definition)', {silent = true}) +vim.keymap.set('n', 'gi', '(coc-implementation)', {silent = true}) +vim.keymap.set('n', 'gr', '(coc-references)', {silent = true}) + -- Plugins require('plugins')