feat(nvim): add cmp-git source for cmp

This commit is contained in:
Price Hiller 2023-07-13 22:35:02 -05:00
parent 32fc8c7995
commit 5a299830fd
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
3 changed files with 11 additions and 2 deletions

View File

@ -21,8 +21,9 @@ cmp.setup({
cmdline_history = { symbol = "", name = "Cmd History", hl_group = "CmdHistory" }, cmdline_history = { symbol = "", name = "Cmd History", hl_group = "CmdHistory" },
rg = { symbol = "", name = "Ripgrep", hl_group = "Ripgrep" }, rg = { symbol = "", name = "Ripgrep", hl_group = "Ripgrep" },
npm = { symbol = "", name = "Npm,", hl_group = "Npm," }, npm = { symbol = "", name = "Npm,", hl_group = "Npm," },
conventionalcommits = { symbol = "󰊢 ", name = "Commit", hl_group = "Commit" }, conventionalcommits = { symbol = " ", name = "Commit", hl_group = "Commit" },
spell = { symbol = "󰏪 ", name = "Spell", hl_group = "Spell" }, spell = { symbol = "󰏪 ", name = "Spell", hl_group = "Spell" },
git = { symbol = "󰊢 ", name = "Git", hl_group = "Git" },
} }
local extra_kind_icons = { local extra_kind_icons = {
@ -140,6 +141,7 @@ cmp.setup({
}, },
{ name = "async_path", priority = 6 }, { name = "async_path", priority = 6 },
{ name = "zsh", priority = 5 }, { name = "zsh", priority = 5 },
{ name = "git", priority = 4 },
{ name = "emoji", keyword_length = 2 }, { name = "emoji", keyword_length = 2 },
{ name = "neorg" }, { name = "neorg" },
{ name = "calc" }, { name = "calc" },
@ -164,7 +166,8 @@ cmp.setup({
-- Git Commit Completions -- Git Commit Completions
cmp.setup.filetype("gitcommit", { cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "conventionalcommits", priority = 2 }, { name = "conventionalcommits", priority = 3 },
{ name = " git", priority = 2 },
{ name = "emoji", keyword_length = 2, priority = 1 }, { name = "emoji", keyword_length = 2, priority = 1 },
}), }),
}) })

View File

@ -86,6 +86,7 @@ require("kanagawa").setup({
CmpItemKindInterface = { fg = colors.fujiWhite, bg = colors.waveRed }, CmpItemKindInterface = { fg = colors.fujiWhite, bg = colors.waveRed },
CmpItemKindColor = { fg = colors.fujiWhite, bg = colors.waveAqua2 }, CmpItemKindColor = { fg = colors.fujiWhite, bg = colors.waveAqua2 },
CmpItemKindTypeParameter = { fg = colors.fujiWhite, bg = colors.waveAqua2 }, CmpItemKindTypeParameter = { fg = colors.fujiWhite, bg = colors.waveAqua2 },
CmpCustomSelectionGit = { fg = colors.fujiWhite, bg = colors.roninYellow },
CmpCustomSelectionBuffer = { fg = colors.fujiWhite, bg = colors.dragonBlue }, CmpCustomSelectionBuffer = { fg = colors.fujiWhite, bg = colors.dragonBlue },
CmpCustomSelectionPath = { fg = colors.fujiWhite, bg = colors.autumnYellow }, CmpCustomSelectionPath = { fg = colors.fujiWhite, bg = colors.autumnYellow },
CmpCustomSelectionCalculator = { fg = colors.fujiWhite, bg = colors.waveBlue2 }, CmpCustomSelectionCalculator = { fg = colors.fujiWhite, bg = colors.waveBlue2 },

View File

@ -284,6 +284,11 @@ lazy.setup({
"onsails/lspkind.nvim", "onsails/lspkind.nvim",
"f3fora/cmp-spell", "f3fora/cmp-spell",
"FelipeLema/cmp-async-path", "FelipeLema/cmp-async-path",
{
"petertriho/cmp-git",
dependencies = { "nvim-lua/plenary.nvim" },
opts = { filetypes = { "*" } },
},
-- Snippets -- Snippets
{ {
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",