28 lines
667 B
Lua
28 lines
667 B
Lua
return {
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
opts = function(_, opts)
|
|
local cmp = require("cmp")
|
|
local lspkind = require('lspkind')
|
|
|
|
opts.sources = cmp.config.sources({
|
|
{ name = "nvim_lsp" },
|
|
{ name = "luasnip" },
|
|
{ name = "buffer" },
|
|
{ name = "path" },
|
|
})
|
|
|
|
opts.experimental = { ghost_text = true }
|
|
opts.formatting.fields = {"abbr", "kind", "menu"}
|
|
opts.formatting.format = lspkind.cmp_format({
|
|
mode = "symbol_text",
|
|
menu = ({
|
|
buffer = "[BUFFER]",
|
|
nvim_lsp = "[LSP]",
|
|
luasnip = "[SNIP]",
|
|
path = "[PATH]",
|
|
})
|
|
})
|
|
end,
|
|
}
|
|
}
|