From 5757a91a4506f9da0f06eed91f70c538ea89a417 Mon Sep 17 00:00:00 2001 From: Charles Danesi Date: Thu, 12 Dec 2024 21:25:33 -0500 Subject: [PATCH] change sources priority --- .config/nvim/lua/plugins/autocomplete.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/plugins/autocomplete.lua b/.config/nvim/lua/plugins/autocomplete.lua index 588973c..fcb6636 100644 --- a/.config/nvim/lua/plugins/autocomplete.lua +++ b/.config/nvim/lua/plugins/autocomplete.lua @@ -112,12 +112,12 @@ return { sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'luasnip' }, + { name = 'path' }, { name = 'nvim_lsp_signature_help' }, { name = 'nvim_lua' }, { name = 'nerdfont' }, - { name = 'buffer', keyword_length = 5 }, - { name = 'path' }, { name = 'calc' }, + { name = 'buffer', keyword_length = 5 }, }), ---@diagnostic disable-next-line: missing-fields formatting = { @@ -125,7 +125,7 @@ return { expandable_indicator = true, format = function(entry, vim_item) if vim.tbl_contains({ 'path' }, entry.source.name) then - local icon, hl_group = require('nvim-web-devicons').get_icon(entry:completion_item().label) + local icon, hl_group = require('nvim-web-devicons').get_icon(entry:get_completion_item().label) if icon then vim_item.kind = icon vim_item.kind_hl_group = hl_group