feat(nvim): add snippet selection to cmp

This commit is contained in:
Price Hiller 2023-12-08 15:02:13 -06:00
parent 55dd3b27c3
commit 9a22d8c10f
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
2 changed files with 7 additions and 3 deletions

View File

@ -158,7 +158,8 @@ return {
npm = { symbol = "", name = "Npm,", hl_group = "Npm," },
conventionalcommits = { symbol = "", name = "Commit", hl_group = "Commit" },
git = { symbol = "󰊢 ", name = "Git", hl_group = "Git" },
docker_compose_language_service = { symbol = "󰡨 ", name = "Docker", hl_group = "Docker" }
docker_compose_language_service = { symbol = "󰡨 ", name = "Docker", hl_group = "Docker" },
luasnip = { symbol = "", name = "Snippet" }
}
local extra_kind_icons = {
@ -237,14 +238,16 @@ return {
end
kind.kind = " " .. strings[1] .. " "
if not kind.menu and lsp_name then
kind.menu = "" .. lsp_name
kind.menu = "" .. lsp_name
end
completion_item = kind
else
completion_item.kind = " " .. selection.symbol
completion_item.menu = selection.symbol .. selection.name
completion_item.kind_hl_group = "CmpCustomSelection" .. selection.hl_group
if selection.hl_group then
completion_item.kind_hl_group = "CmpCustomSelection" .. selection.hl_group
end
end
if not completion_item.abbr then

View File

@ -121,6 +121,7 @@ return {
CmpCustomSelectionRipgrep = { fg = colors.fujiWhite, bg = colors.crystalBlue },
CmpCustomSelectionNpm = { fg = colors.fujiWhite, bg = colors.peachRed },
CmpCustomSelectionCommit = { fg = colors.fujiWhite, bg = colors.peachRed },
CmpCustomSelectionSnippet = { fg = colors.fujiWhite, bg = colors.peachRed },
TelescopeNormal = { bg = colors.sumiInk2 },
TelescopeBorder = { bg = colors.sumiInk2, fg = colors.sumiInk1 },
TelescopePromptBorder = { bg = colors.sumiInk0, fg = colors.sumiInk0 },