✨ feat(nvim): new cmp sources
still working to bring more
This commit is contained in:
parent
f60979981c
commit
0c8bbde191
1 changed files with 23 additions and 6 deletions
|
@ -9,9 +9,26 @@ return {
|
||||||
event = { "BufRead package.json" },
|
event = { "BufRead package.json" },
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"petertriho/cmp-git",
|
||||||
},
|
},
|
||||||
opts = {
|
{
|
||||||
mapping = cmp.mapping.preset.insert({
|
"amarakon/nvim-cmp-fonts",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
cmp.setup.filetype("gitcommit", {
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "git" }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup.filetype("css", {
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "fonts", option = { space_filter = "-" } }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
opts.mapping = cmp.mapping.preset.insert({
|
||||||
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
["<C-p>"] = cmp.mapping.scroll_docs(-4),
|
["<C-p>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
@ -27,11 +44,11 @@ return {
|
||||||
cmp.abort()
|
cmp.abort()
|
||||||
fallback()
|
fallback()
|
||||||
end,
|
end,
|
||||||
}),
|
})
|
||||||
window = {
|
opts.window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
}
|
||||||
},
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue