aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/completition.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins/completition.lua')
-rw-r--r--lua/plugins/completition.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua
index 071c16c..bde2568 100644
--- a/lua/plugins/completition.lua
+++ b/lua/plugins/completition.lua
@@ -155,6 +155,26 @@ return {
-- Experimental signature help support
signature = { enabled = true },
+ cmdline = {
+ enabled = true,
+ keymap = {
+ ["<Tab>"] = { "select_next", "fallback" },
+ ["<S-Tab>"] = { "select_prev", "fallback" },
+ ["<CR>"] = { "accept", "fallback" },
+ ["<C-e>"] = { "cancel", "fallback" },
+ },
+ completion = {
+ list = { selection = { preselect = false, auto_insert = false } },
+ menu = { auto_show = true },
+ },
+ sources = function()
+ local type = vim.fn.getcmdtype()
+ if type == "/" or type == "?" then return { "buffer" } end
+ if type == ":" or type == "@" then return { "cmdline" } end
+ return {}
+ end,
+ },
+
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
fuzzy = { implementation = "prefer_rust_with_warning" },
},