[nvim] some better cmp stuff

This commit is contained in:
Afonso Franco 2025-02-05 17:00:42 +00:00
parent 822515a098
commit 421b6f52e5
Signed by: afonso
SSH key fingerprint: SHA256:PQTRDHPH3yALEGtHXnXBp3Orfcn21pK20t0tS1kHg54
5 changed files with 69 additions and 54 deletions

View file

@ -4,11 +4,17 @@ return {
lazy = false,
dependencies = {
'rafamadriz/friendly-snippets',
{ 'echasnovski/mini.icons', version = '*' },
},
version = "*",
version = '*',
opts = {
enabled = function()
return not (string.find(vim.bo.filetype, "himalaya") or string.find(vim.bo.filetype, "mail"))
end,
keymap = {
preset = 'default',
['<Up>'] = {},
['<Down>'] = {},
['<C-u>'] = { 'scroll_documentation_up', 'fallback' },
['<C-d>'] = { 'scroll_documentation_down', 'fallback' },
},
@ -44,6 +50,19 @@ return {
draw = {
treesitter = { 'lsp' },
columns = { { 'kind_icon' }, { 'label' } },
components = {
kind_icon = {
ellipsis = false,
text = function(ctx)
local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
return kind_icon
end,
highlight = function(ctx)
local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
return hl
end,
}
}
}
},
documentation = {