feat: add cmdline history and prompt completion sources

This commit is contained in:
2024-08-31 16:42:34 -04:00
parent 7ca3fae110
commit 8458d56b52
2 changed files with 11 additions and 3 deletions
+7 -3
View File
@@ -28,7 +28,6 @@ return {
local border_opts = {
border = "rounded",
winhighlight = "Normal:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None",
}
local window_opts = {
completion = cmp.config.window.bordered(border_opts),
@@ -77,8 +76,8 @@ return {
{ name = "dotenv" },
{ name = "calc" },
{ name = "conventionalcommits" },
{ name = "gitmoji" },
{ name = "emoji" },
{ name = "gitmoji", priority = 9998 },
{ name = "emoji", priority = 9999 },
},
formatting = {
fields = { "abbr", "kind", "menu" },
@@ -112,6 +111,8 @@ return {
ignore_cmds = { "Man", "!" },
},
},
}, { name = "cmp-cmdline-history" }, {
name = "cmp-cmdline-prompt",
}),
})
@@ -119,6 +120,9 @@ return {
cmp.setup.filetype("cmdline", {
sources = {
{ name = "cmdline" }, -- Ensure 'cmdline' source is available
{ name = "path" },
{ name = "cmp-cmdline-history" },
{ name = "cmp-cmdline-prompt" },
},
})