diff options
| author | bh <qn+git@excalibur.computer> | 2026-03-15 14:36:27 +0800 |
|---|---|---|
| committer | bh <qn+git@excalibur.computer> | 2026-03-15 14:36:27 +0800 |
| commit | ffbd8a6e1babcbd18b7bddae57831c3ac472ae78 (patch) | |
| tree | 51ad61e6c34438030e352af74d4d9364244ba3fc /lua/config | |
| parent | be738ab8639cc2fe69ce58419d03889806a875d3 (diff) | |
Change completion shortcut from tab back to ctrl + space
Diffstat (limited to 'lua/config')
| -rw-r--r-- | lua/config/completion.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/config/completion.lua b/lua/config/completion.lua index d04a26a..09a934e 100644 --- a/lua/config/completion.lua +++ b/lua/config/completion.lua @@ -16,6 +16,7 @@ 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 @@ -23,7 +24,7 @@ return function() elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else - cmp.complete() + fallback() end end, { "i", "s" }), ["<S-Tab>"] = cmp.mapping(function(fallback) @@ -51,7 +52,7 @@ return function() documentation = cmp.config.window.bordered(), }, completion = { - autocomplete = false, -- only trigger with <Tab> + autocomplete = false, -- only trigger with <C-Space> }, }) end |
