From 7ace62da72a5988ee091964a75a022ff2610b539 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 7 Aug 2023 15:37:35 +0000 Subject: [PATCH] home: vim: use async path completion This makes the editor more responsive when completing in directories that are network mounted or have a large amount of entries. --- home/vim/default.nix | 1 + home/vim/plugin/settings/completion.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/home/vim/default.nix b/home/vim/default.nix index 1aad3c1..a9c2bda 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -77,6 +77,7 @@ in luasnip # Snippet manager compatible with LSP friendly-snippets # LSP snippets collection nvim-cmp # Completion engine + cmp-async-path # More responsive path completion cmp-buffer # Words from open buffers cmp-nvim-lsp # LSP suggestions cmp-nvim-lua # NeoVim lua API diff --git a/home/vim/plugin/settings/completion.lua b/home/vim/plugin/settings/completion.lua index 2d150e8..0ed8c7f 100644 --- a/home/vim/plugin/settings/completion.lua +++ b/home/vim/plugin/settings/completion.lua @@ -37,7 +37,7 @@ cmp.setup({ entries = "native", }, sources = { - { name = "path", priority_weight = 110 }, + { name = "async_path", priority_weight = 110 }, { name = "nvim_lsp", priority_weight = 100 }, { name = "nvim_lua", priority_weight = 90 }, { name = "luasnip", priority_weight = 80 },