align keymap to vscode

This commit is contained in:
2026-03-20 10:41:10 +02:00
parent 5e8c8e7af2
commit ccf1054eee
4 changed files with 49 additions and 32 deletions

View File

@@ -132,6 +132,13 @@ return {
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = cmp.mapping(function(fallback) -- add this
if cmp.visible() then
cmp.confirm({ select = true })
else
fallback()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },