From e6f42b4bd17605a02d5ecdbcc5c3fd58d274515d Mon Sep 17 00:00:00 2001 From: Szwendacz99 Date: Wed, 2 Nov 2022 12:39:26 +0100 Subject: [PATCH] fix nerdcommenter custom bindings --- init.vim | 5 +++-- lua/general.lua | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/init.vim b/init.vim index aaca3e2..16687dc 100644 --- a/init.vim +++ b/init.vim @@ -15,6 +15,7 @@ Plug 'mfussenegger/nvim-lint' "Plug 'dense-analysis/ale' " various plugins +Plug 'L3MON4D3/LuaSnip', {'tag': 'v1.*'} Plug 'lambdalisue/suda.vim' Plug 'airblade/vim-gitgutter' Plug 'akinsho/bufferline.nvim', { 'tag': 'v3.*' } @@ -64,8 +65,8 @@ nnoremap n :NvimTreeFocus nnoremap :NvimTreeToggle " nerdcommenter custom bindings -nmap NERDCommenterToggle -vmap NERDCommenterToggle +nmap NERDCommenterToggle +vmap NERDCommenterToggle "theme configuration syntax enable diff --git a/lua/general.lua b/lua/general.lua index c4f937c..bae3273 100644 --- a/lua/general.lua +++ b/lua/general.lua @@ -42,7 +42,13 @@ codewindow.apply_default_keybinds() local cmp = require'cmp' cmp.setup({ - window = { +snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + end, + }, + window = { -- completion = cmp.config.window.bordered(), -- documentation = cmp.config.window.bordered(), },