mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Update configuration for nvim-cmp
1. restrict max width of the completion menu. Here I am using lspkind.nvim to achieve this. There are other native ways to do this, see also https://github.com/hrsh7th/nvim-cmp/discussions/609 and https://github.com/hrsh7th/nvim-cmp/issues/980 2. remove cmp-emoji as it is rarely used and interfere when I write Python 3. lower the transparency for popup menu
This commit is contained in:
@@ -35,7 +35,6 @@ cmp.setup {
|
||||
{ name = "ultisnips" }, -- For ultisnips user.
|
||||
{ name = "path" }, -- for path completion
|
||||
{ name = "buffer", keyword_length = 2 }, -- for buffer word completion
|
||||
{ name = "emoji", insert = true }, -- emoji completion
|
||||
},
|
||||
completion = {
|
||||
keyword_length = 1,
|
||||
@@ -50,12 +49,14 @@ cmp.setup {
|
||||
menu = {
|
||||
nvim_lsp = "[LSP]",
|
||||
ultisnips = "[US]",
|
||||
nvim_lua = "[Lua]",
|
||||
path = "[Path]",
|
||||
buffer = "[Buffer]",
|
||||
emoji = "[Emoji]",
|
||||
omni = "[Omni]",
|
||||
},
|
||||
show_labelDetails = true,
|
||||
maxwidth = 40,
|
||||
ellipsis_char = "...",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user