feat: improve nvim experience

This commit is contained in:
Moritz Böhme 2024-06-17 10:02:10 +02:00
parent c11a2c5596
commit fcfc548717
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
3 changed files with 14 additions and 12 deletions

View file

@ -8,6 +8,9 @@ cmp.setup({
mode = "symbol", -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
symbol_map = {
Copilot = "",
},
}),
},
enabled = function()
@ -59,14 +62,13 @@ cmp.setup({
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "async_path", priority = 1 },
{ name = "nvim_lsp", priority = 2 },
{ name = "nvim_lsp_signature_help", priority = 3 },
{ name = "luasnip", priority = 4 },
}, {
{ name = "async_path" },
{ name = "buffer" },
{ name = "spell" },
{ priority = 1, name = "async_path" },
{ priority = 1, name = "buffer" },
{ priority = 1, name = "spell" },
{ priority = 2, name = "nvim_lsp" },
{ priority = 3, name = "copilot" },
{ priority = 3, name = "nvim_lsp_signature_help" },
{ priority = 4, name = "luasnip" },
}),
})