Skip to content

Commit

Permalink
neovim: prioritise LSP snippets over other snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
geodimm committed Jan 2, 2025
1 parent 8b62f29 commit d619826
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nvim/lua/plugins/autocompletion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ return {
return { 'lsp', 'path', 'snippets', 'buffer' }
end,
providers = {
lsp = {
transform_items = function(_, items)
for _, item in ipairs(items) do
if item.kind == require('blink.cmp.types').CompletionItemKind.Snippet then
item.score_offset = item.score_offset - 2
end
end

return vim.tbl_filter(function(item)
return item.kind ~= require('blink.cmp.types').CompletionItemKind.Text
end, items)
end,
},
lazydev = {
name = 'lazydev',
module = 'lazydev.integrations.blink',
Expand Down

0 comments on commit d619826

Please sign in to comment.