refactor nvim: cmp
This commit is contained in:
parent
192e7cc48f
commit
7a1aecf89c
@ -22,6 +22,13 @@ cmp.setup({
|
|||||||
-- completion = cmp.config.window.bordered(),
|
-- completion = cmp.config.window.bordered(),
|
||||||
-- documentation = cmp.config.window.bordered(),
|
-- documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
|
formatting = {
|
||||||
|
format = require("lspkind").cmp_format {
|
||||||
|
mode = "symbol_text", -- 顯示圖示+文字
|
||||||
|
maxwidth = 50,
|
||||||
|
ellipsis_char = "...",
|
||||||
|
},
|
||||||
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
@ -46,14 +53,6 @@ cmp.setup({
|
|||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
}),
|
}),
|
||||||
|
|
||||||
formatting = {
|
|
||||||
format = require("lspkind").cmp_format {
|
|
||||||
mode = "symbol_text", -- 顯示圖示+文字
|
|
||||||
maxwidth = 50,
|
|
||||||
ellipsis_char = "...",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below
|
-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below
|
||||||
|
Loading…
x
Reference in New Issue
Block a user