[nvim] some better cmp stuff
This commit is contained in:
parent
822515a098
commit
421b6f52e5
5 changed files with 69 additions and 54 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue