mirror of
https://github.com/WarrenHood/dotfiles.git
synced 2025-04-30 00:04:59 +01:00
Fix literal tabs not working
This commit is contained in:
parent
1b30e6d49d
commit
7913d705ee
|
@ -21,8 +21,20 @@ cmp.setup({
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
["<Tab>"] = cmp.mapping(function() if cmp.visible() then cmp.select_next_item() end end),
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
["<S-Tab>"] = cmp.mapping(function() if cmp.visible() then cmp.select_prev_item() end end),
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
|
|
Loading…
Reference in a new issue