init.lua/after/plugin/cmp.lua

31 lines
573 B
Lua
Raw Normal View History

2024-02-11 18:34:46 +05:30
require("cmp_git").setup()
2024-02-11 17:31:06 +05:30
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "luasnip" },
2024-02-11 18:34:46 +05:30
}, {
{ name = "buffer" },
2024-02-11 17:31:06 +05:30
}),
formatting = {
format = require("lspkind").cmp_format({
mode = "symbol_text",
}),
},
})
2024-02-11 18:34:46 +05:30
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "git" },
}, {
{ name = "buffer" },
}),
})