formatted code

This commit is contained in:
Neeraj 2023-02-28 17:18:54 +05:30
parent da382b5d61
commit 4316ac84df
15 changed files with 227 additions and 230 deletions

View file

@ -1,26 +1,24 @@
return {
'onsails/lspkind.nvim',
config = function ()
config = function()
local lspkind = require 'lspkind'
local lspkind = require'lspkind'
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
-- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
before = function (entry, vim_item)
return vim_item
end
})
}
}
-- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
before = function(entry, vim_item)
return vim_item
end
})
}
}
end
}