diff --git a/nvim/lua/plugins/autocompletion.lua b/nvim/lua/plugins/autocompletion.lua index 3d26678..4d83d40 100644 --- a/nvim/lua/plugins/autocompletion.lua +++ b/nvim/lua/plugins/autocompletion.lua @@ -3,9 +3,7 @@ return { 'hrsh7th/nvim-cmp', config = function() local cmp = require('cmp') - local compare = require('cmp.config.compare') local context = require('cmp.config.context') - local types = require('cmp.types') local luasnip = require('luasnip') local lspkind = require('lspkind') local cmp_git = require('cmp_git') @@ -37,27 +35,6 @@ return { end end - local function custom_kind_comparator(entry1, entry2) - local kind1 = entry1:get_kind() - local kind2 = entry2:get_kind() - kind1 = kind1 == types.lsp.CompletionItemKind.Text and 100 or kind1 - kind2 = kind2 == types.lsp.CompletionItemKind.Text and 100 or kind2 - if kind1 ~= kind2 then - if kind1 == types.lsp.CompletionItemKind.Snippet then - return false - end - if kind2 == types.lsp.CompletionItemKind.Snippet then - return true - end - local diff = kind1 - kind2 - if diff < 0 then - return true - elseif diff > 0 then - return false - end - end - end - cmp.setup({ enabled = function() local disabled = false @@ -120,23 +97,6 @@ return { end, }, - sorting = { - priority_weight = 2, - comparators = { - compare.exact, - compare.offset, - -- compare.scopes, - compare.score, - -- compare.recently_used, - -- compare.locality, - -- compare.kind, - custom_kind_comparator, - compare.sort_text, - compare.length, - compare.order, - }, - }, - sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'nvim_lsp_signature_help' },