X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/9603dc4bd113317d57643c269f3dff0076247116..2b6ed8d5ad9b22cf02848ede02c6076a5f77c2a1:/config/nvim/init.lua 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')