Nice icons for completions
This commit is contained in:
parent
c303fa0cec
commit
6f90d902b9
|
@ -1,4 +1,5 @@
|
|||
local cmp = require('cmp')
|
||||
local lspkind = require('lspkind')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
|
@ -32,6 +33,14 @@ cmp.setup({
|
|||
{ name = 'buffer' },
|
||||
--{ name = 'path' },
|
||||
}),
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol_text', -- show only symbol annotations
|
||||
maxwidth = 80, -- 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)
|
||||
symbol_map = { Copilot = "" },
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
--cmp.setup.cmdline({ '/', '?' }, {
|
||||
|
|
|
@ -41,6 +41,8 @@ Plug 'nvim-lua/plenary.nvim'
|
|||
Plug 'scalameta/nvim-metals'
|
||||
Plug 'williamboman/mason.nvim'
|
||||
Plug 'williamboman/mason-lspconfig.nvim'
|
||||
Plug 'onsails/lspkind.nvim'
|
||||
|
||||
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'nvim-lua/lsp-status.nvim'
|
||||
|
|
Loading…
Reference in a new issue