Nvim: separate cmp and luasnip configs
This commit is contained in:
parent
884c678e43
commit
65f2fd46a2
3 changed files with 34 additions and 26 deletions
15
home/.config/nvim/lua/plugins/luasnip.lua
Normal file
15
home/.config/nvim/lua/plugins/luasnip.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
return function()
|
||||
local luasnip = require('luasnip')
|
||||
local wk = require('which-key')
|
||||
|
||||
-- load friendly-snippets to luasnip
|
||||
require('luasnip/loaders/from_vscode').lazy_load()
|
||||
|
||||
-- Register snippet navigation keybindings
|
||||
local snippet_mappings = {
|
||||
['<c-j>'] = {luasnip.jump(1)},
|
||||
['<c-k>'] = {luasnip.jump(-1)}
|
||||
}
|
||||
wk.register(snippet_mappings, {mode = "i"})
|
||||
wk.register(snippet_mappings, {mode = "s"})
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue