diff --git a/dots/.config/nvim/lazy-lock.json b/dots/.config/nvim/lazy-lock.json index e0b0ce81..6781f8a3 100644 --- a/dots/.config/nvim/lazy-lock.json +++ b/dots/.config/nvim/lazy-lock.json @@ -6,6 +6,7 @@ "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, "bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" }, "ccc.nvim": { "branch": "main", "commit": "0ca30a4fd8429bffb6394f4ee27166fb4ff29fbf" }, + "cmp-async-path": { "branch": "main", "commit": "9d581eec5acf812316913565c135b0d1ee2c9a71" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, @@ -16,7 +17,6 @@ "cmp-npm": { "branch": "main", "commit": "2337f109f51a09297596dd6b538b70ccba92b4e4" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-rg": { "branch": "master", "commit": "677a7874ee8f1afc648c2e7d63a97bc21a7663c5" }, "cmp-zsh": { "branch": "main", "commit": "c24db8e58fac9006ec23d93f236749288d00dec9" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, diff --git a/dots/.config/nvim/lua/plugins/configs/cmp.lua b/dots/.config/nvim/lua/plugins/configs/cmp.lua index d64198fd..49d27e9c 100644 --- a/dots/.config/nvim/lua/plugins/configs/cmp.lua +++ b/dots/.config/nvim/lua/plugins/configs/cmp.lua @@ -23,7 +23,7 @@ return { "David-Kunz/cmp-npm", "lukas-reineke/cmp-rg", "onsails/lspkind.nvim", - { "hrsh7th/cmp-path" }, + "FelipeLema/cmp-async-path", { "tzachar/cmp-fuzzy-buffer", dependencies = { @@ -119,12 +119,12 @@ return { local standard_sources = function(sources) sources = sources or {} local default_sources = { + { name = "async_path" }, { name = "nvim_lsp" }, { name = "luasnip", max_item_count = 5 }, -- For luasnip users. - { name = "path" }, { name = "fuzzy_buffer", - max_item_count = 5 + max_item_count = 5, }, { name = "rg", @@ -401,22 +401,25 @@ return { -- Use buffer 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 = "fuzzy_buffer" }), + sources = cmp.config.sources({ name = "fuzzy_buffer" }), }) cmp.setup.cmdline("?", { mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ name = "fuzzy_buffer" }), + sources = cmp.config.sources({ name = "fuzzy_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 = "async_path" }, { name = "cmdline", option = { - ignore_cmds = { "!" }, + ignore_cmds = { + "!", + }, }, }, { name = "cmdline_history", max_item_count = 3 },