From 236e51b0d04d6af65b1821d31cfec58da5e9a0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 22 Oct 2023 13:59:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AC=20comments(nvim):=20commented=20co?= =?UTF-8?q?de=20that=20doesnt=20work=20on=20the=20cmp=20extra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/plugins/extras/cmp.lua | 45 +++++++++++++++++++------ 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/cmp.lua b/.config/nvim/lua/plugins/extras/cmp.lua index 4cd9b2c8..fbbfac4e 100644 --- a/.config/nvim/lua/plugins/extras/cmp.lua +++ b/.config/nvim/lua/plugins/extras/cmp.lua @@ -47,17 +47,42 @@ return { { "cM", ":CmpStatus", desc = "Cmp Status" }, }, opts = function(_, opts) - cmp.setup.filetype("gitcommit", { - sources = cmp.config.sources({ - { name = "git" }, - }), - }) + -- 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" }, + -- }), + -- }) - cmp.setup.filetype("css", { - sources = cmp.config.sources({ - { name = "fonts", option = { space_filter = "-" } }, - }), - }) opts.mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),