X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/d2de72a404ea05860ed2f1c0687890f8b1ee4f22..34ae8e65b520ac2597c2ea2554534ec4987852ce:/config/nvim/init.lua?ds=sidebyside diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 02f5bd5..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 @@ -108,20 +107,34 @@ vim.g.limelight_conceal_guifg = 'DarkGray' vim.api.nvim_create_autocmd({'User'}, { pattern = 'GoyoEnter', - callback = 'Limelight' + command = 'Limelight' }) vim.api.nvim_create_autocmd({'User'}, { pattern = 'GoyoLeave', - callback = 'Limelight!' + command = 'Limelight!' }) ---[[ -nnoremap i :Limelight!!== -inoremap i :Limelight!!==gi -vnoremap i :Limelight!!gv=gv -nnoremap g :Goyo== -inoremap g :Goyo==gi -vnoremap g :Goyogv=gv -]]-- + +vim.keymap.set('n', 'i', ':Limelight!!==') +vim.keymap.set('i', 'i', ':Limelight!!==gi') +vim.keymap.set('v', 'i', ':Limelight!!gv=gv') +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')