From 12030839251e655554655bae5bae333ff8c9a5ba Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Thu, 18 Apr 2024 10:39:43 +0200 Subject: [PATCH] Remove default C-e abort in cmp, and small refactorings --- nvim/lua/plugs/cmp.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nvim/lua/plugs/cmp.lua b/nvim/lua/plugs/cmp.lua index ad4f272..09a3b76 100644 --- a/nvim/lua/plugs/cmp.lua +++ b/nvim/lua/plugs/cmp.lua @@ -24,22 +24,23 @@ return { [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. }), sources = cmp.config.sources({ - { name = "nvim_lsp" }, - }, - { - { name = "buffer" }, - }) + { name = "nvim_lsp" }, + }, + { + { name = "buffer" }, + }) }) -- Set configuration for specific filetype. 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). - }, { + sources = cmp.config.sources( + { + { name = "git" }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). + }, + { { name = "buffer" }, }) }) @@ -58,10 +59,9 @@ return { sources = cmp.config.sources({ { name = "path" } }, { - { name = "cmdline" } - }), + { name = "cmdline" } + }), matching = { disallow_symbol_nonprefix_matching = false } }) - end, }