🐛 fix(nvim): cmp new sources added
This commit is contained in:
parent
cb06825de9
commit
68668f1d2b
2 changed files with 10 additions and 36 deletions
|
@ -14,6 +14,7 @@
|
|||
"ccc.nvim": { "branch": "main", "commit": "f77b477d9f0b9a28612212b3fc43145f2a5591cc" },
|
||||
"cinnamon.nvim": { "branch": "master", "commit": "c406ffda3a0302f32c23b24ab756ea20467d6578" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||
"cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
|
|
|
@ -10,47 +10,20 @@ return {
|
|||
{
|
||||
"amarakon/nvim-cmp-fonts",
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>ciC", ":CmpStatus<CR>", desc = "Cmp Status" },
|
||||
},
|
||||
opts = function(_, opts)
|
||||
-- TODO: Fix this comments
|
||||
-- cmp.setup.filetype("gitcommit", {
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = "git" },
|
||||
-- }),
|
||||
-- })
|
||||
--
|
||||
-- cmp.setup.filetype("css", {
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = "nvim_lsp" },
|
||||
-- { name = "luasnip" },
|
||||
-- { name = "path" },
|
||||
-- }, {
|
||||
-- { name = "buffer" },
|
||||
-- { name = "fonts", option = { space_filter = "-" } },
|
||||
-- }),
|
||||
-- })
|
||||
--
|
||||
-- -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
-- cmp.setup.cmdline({ "/", "?" }, {
|
||||
-- mapping = cmp.mapping.preset.cmdline(),
|
||||
-- sources = {
|
||||
-- { name = "buffer" },
|
||||
-- },
|
||||
-- })
|
||||
--
|
||||
-- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
-- cmp.setup.cmdline(":", {
|
||||
-- mapping = cmp.mapping.preset.cmdline(),
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = "path" },
|
||||
-- }, {
|
||||
-- { name = "cmdline" },
|
||||
-- }),
|
||||
-- })
|
||||
|
||||
opts.sources = cmp.config.sources(
|
||||
vim.list_extend(
|
||||
opts.sources,
|
||||
{ { name = "emoji" }, { name = "git" }, { name = "fonts", option = { space_filter = "-" } } }
|
||||
)
|
||||
)
|
||||
opts.mapping = cmp.mapping.preset.insert({
|
||||
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
|
|
Loading…
Add table
Reference in a new issue