cmp for gitcommit

This commit is contained in:
Adithya 2024-02-11 18:34:46 +05:30
parent 34b4192e32
commit 690282a5a0
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,4 @@
require("cmp_git").setup()
local cmp = require("cmp")
cmp.setup({
@ -9,8 +10,9 @@ cmp.setup({
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "buffer" },
{ name = "luasnip" },
}, {
{ name = "buffer" },
}),
formatting = {
format = require("lspkind").cmp_format({
@ -18,3 +20,11 @@ cmp.setup({
}),
},
})
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "git" },
}, {
{ name = "buffer" },
}),
})

View file

@ -51,13 +51,16 @@ return require("packer").startup(function(use)
use({
"nvim-telescope/telescope.nvim",
requires = {
{ "nvim-lua/plenary.nvim" },
},
requires = "nvim-lua/plenary.nvim",
})
use({
"nvim-treesitter/nvim-treesitter",
{ run = ":TSUpdate" },
})
use({
"petertriho/cmp-git",
requires = "nvim-lua/plenary.nvim",
})
end)