🐛 fix(nvim): cmp new sources added

This commit is contained in:
Sergio Laín 2023-11-15 13:01:32 +01:00
parent cb06825de9
commit 68668f1d2b
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
2 changed files with 10 additions and 36 deletions

View file

@ -14,6 +14,7 @@
"ccc.nvim": { "branch": "main", "commit": "f77b477d9f0b9a28612212b3fc43145f2a5591cc" }, "ccc.nvim": { "branch": "main", "commit": "f77b477d9f0b9a28612212b3fc43145f2a5591cc" },
"cinnamon.nvim": { "branch": "master", "commit": "c406ffda3a0302f32c23b24ab756ea20467d6578" }, "cinnamon.nvim": { "branch": "master", "commit": "c406ffda3a0302f32c23b24ab756ea20467d6578" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" }, "cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },

View file

@ -10,47 +10,20 @@ return {
{ {
"amarakon/nvim-cmp-fonts", "amarakon/nvim-cmp-fonts",
}, },
{
"hrsh7th/cmp-emoji",
},
}, },
keys = { keys = {
{ "<leader>ciC", ":CmpStatus<CR>", desc = "Cmp Status" }, { "<leader>ciC", ":CmpStatus<CR>", desc = "Cmp Status" },
}, },
opts = function(_, opts) opts = function(_, opts)
-- TODO: Fix this comments opts.sources = cmp.config.sources(
-- cmp.setup.filetype("gitcommit", { vim.list_extend(
-- sources = cmp.config.sources({ opts.sources,
-- { name = "git" }, { { name = "emoji" }, { name = "git" }, { name = "fonts", option = { space_filter = "-" } } }
-- }), )
-- }) )
--
-- 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.mapping = cmp.mapping.preset.insert({ 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 }),