nvim: add neogen
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
vim.opt.completeopt = { "menuone", "noselect" }
|
||||
|
||||
local cmp = require("cmp")
|
||||
local neogen = require("neogen")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
@ -19,6 +20,26 @@ cmp.setup({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
}),
|
||||
["<tab>"] = cmp.mapping(function(fallback)
|
||||
if neogen.jumpable() then
|
||||
neogen.jump_next()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-tab>"] = cmp.mapping(function(fallback)
|
||||
if neogen.jumpable(true) then
|
||||
neogen.jump_prev()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
|
||||
Reference in New Issue
Block a user