mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
chore(nvim): add nvim-cmp plugin
This commit is contained in:
@@ -43,6 +43,7 @@ local kind_icons = {
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
Octoface = "",
|
||||
}
|
||||
-- find more here: https://www.nerdfonts.com/cheat-sheet
|
||||
|
||||
@@ -98,12 +99,8 @@ cmp.setup({
|
||||
-- Kind icons
|
||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||
|
||||
if entry.source.name == "copilot" then
|
||||
vim_item.kind = icons.git.Octoface
|
||||
vim_item.kind_hl_group = "CmpItemKindCopilot"
|
||||
end
|
||||
-- vim_item.kind = string.format("%s %s", kind_icons[vim_item.kind], vim_item.kind) -- This concatenates the icons with the name of the item kind
|
||||
vim_item.menu = ({
|
||||
copilot = "[C]",
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[Snippet]",
|
||||
buffer = "[Buffer]",
|
||||
@@ -118,37 +115,7 @@ cmp.setup({
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{
|
||||
name = "copilot",
|
||||
-- keyword_length = 0,
|
||||
max_item_count = 3,
|
||||
trigger_characters = {
|
||||
{
|
||||
".",
|
||||
":",
|
||||
"(",
|
||||
"'",
|
||||
'"',
|
||||
"[",
|
||||
",",
|
||||
"#",
|
||||
"*",
|
||||
"@",
|
||||
"|",
|
||||
"=",
|
||||
"-",
|
||||
"{",
|
||||
"/",
|
||||
"\\",
|
||||
"+",
|
||||
"?",
|
||||
" ",
|
||||
-- "\t",
|
||||
-- "\n",
|
||||
},
|
||||
},
|
||||
group_index = 2,
|
||||
},
|
||||
{ name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lsp_signature_help" },
|
||||
{ name = "luasnip" },
|
||||
|
||||
@@ -59,6 +59,7 @@ return packer.startup(function(use)
|
||||
use("hrsh7th/cmp-path") -- Path completions
|
||||
use("hrsh7th/cmp-cmdline") -- Cmdline completions
|
||||
use("hrsh7th/cmp-nvim-lua") -- Lua API completions
|
||||
use("hrsh7th/cmp-copilot") -- GitHub Copilot completions
|
||||
use("saadparwaiz1/cmp_luasnip") -- Snippet completions
|
||||
use("uga-rosa/cmp-dictionary") -- Dictionary completions
|
||||
use("f3fora/cmp-spell") -- Spell completions
|
||||
|
||||
Reference in New Issue
Block a user