setup key bindings for cmp
This commit is contained in:
parent
690282a5a0
commit
f9be2d3a85
1 changed files with 7 additions and 0 deletions
|
@ -2,6 +2,13 @@ require("cmp_git").setup()
|
|||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
mapping = {
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||
["<C-space>"] = cmp.mapping.complete(),
|
||||
["<C-q>"] = cmp.mapping.close(),
|
||||
["<Tab>"] = cmp.mapping.confirm({ select = true }),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
|
|
Loading…
Reference in a new issue