BREAKING CHANGE | re-implementation of custom config
This commit is contained in:
parent
d906bb0d9c
commit
adecbe719f
20 changed files with 835 additions and 1309 deletions
|
|
@ -6,7 +6,7 @@ end
|
|||
|
||||
vim.opt.completeopt = "menuone,noselect"
|
||||
|
||||
local default = {
|
||||
local options = {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
|
|
@ -45,7 +45,10 @@ local default = {
|
|||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
|
|
@ -54,7 +57,10 @@ local default = {
|
|||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
|
|
@ -65,12 +71,7 @@ local default = {
|
|||
},
|
||||
}
|
||||
|
||||
local M = {}
|
||||
M.setup = function(override_flag)
|
||||
if override_flag then
|
||||
default = require("core.utils").tbl_override_req("nvim_cmp", default)
|
||||
end
|
||||
cmp.setup(default)
|
||||
end
|
||||
-- check for any override
|
||||
-- options = require("core.utils").load_override(options, "cmp")
|
||||
|
||||
return M
|
||||
cmp.setup(options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue