diff options
| author | bh <qn+git@excalibur.computer> | 2026-03-14 20:34:14 +0800 |
|---|---|---|
| committer | bh <qn+git@excalibur.computer> | 2026-03-14 20:34:14 +0800 |
| commit | afbacef686deea1c73b223d5554c01055b752289 (patch) | |
| tree | 37e1fb47315fd4df8312b40a1ae64b056d4e8ffd /lua | |
| parent | f37e054fa7a45da04ad64f10524a187c68f425ca (diff) | |
Change completiion shortcut from ctrl + space to tab
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/config/completion.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/config/completion.lua b/lua/config/completion.lua index 09a934e..d04a26a 100644 --- a/lua/config/completion.lua +++ b/lua/config/completion.lua @@ -16,7 +16,6 @@ return function() mapping = cmp.mapping.preset.insert({ ["<C-b>"] = cmp.mapping.scroll_docs(-4), ["<C-f>"] = cmp.mapping.scroll_docs(4), - ["<C-Space>"] = cmp.mapping.complete(), -- manual trigger ["<CR>"] = cmp.mapping.confirm({ select = true }), ["<Tab>"] = cmp.mapping(function(fallback) if cmp.visible() then @@ -24,7 +23,7 @@ return function() elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else - fallback() + cmp.complete() end end, { "i", "s" }), ["<S-Tab>"] = cmp.mapping(function(fallback) @@ -52,7 +51,7 @@ return function() documentation = cmp.config.window.bordered(), }, completion = { - autocomplete = false, -- only trigger with <C-Space> + autocomplete = false, -- only trigger with <Tab> }, }) end |
