fix commandline cmp select on tab

This commit is contained in:
Patrick Neff 2024-08-07 11:04:14 +02:00
parent aee3628a7e
commit 13db25f74d
1 changed files with 18 additions and 10 deletions

View File

@ -10,7 +10,7 @@
store_selection_keys = "<Tab>"; store_selection_keys = "<Tab>";
}; };
fromLua = [ fromLua = [
{paths = ../../snippets;} { paths = ../../snippets; }
]; ];
}; };
lspkind = { lspkind = {
@ -69,14 +69,14 @@
''; '';
completion.completeopt = "menu,preview"; completion.completeopt = "menu,preview";
sources = [ sources = [
{name = "luasnip";} { name = "luasnip"; }
{name = "nvim_lsp";} { name = "nvim_lsp"; }
{name = "nvim_lsp_signature_help";} { name = "nvim_lsp_signature_help"; }
{name = "nvim_lsp_document_symbol";} { name = "nvim_lsp_document_symbol"; }
{name = "codeium";} { name = "codeium"; }
{name = "path";} { name = "path"; }
{name = "buffer";} { name = "buffer"; }
{name = "treesitter";} { name = "treesitter"; }
]; ];
mapping = { mapping = {
__raw = '' __raw = ''
@ -201,6 +201,14 @@
]; ];
}; };
":" = { ":" = {
completion.completeopt = "menu,menuone,noselect";
mapping = {
__raw = ''
cmp.mapping.preset.cmdline({
["<CR>"] = cmp.mapping.confirm { select = true },
})
'';
};
sources = [ sources = [
{ {
name = "path"; name = "path";
@ -212,7 +220,7 @@
}; };
"?" = { "?" = {
mapping = { mapping = {
completion.completeopt = "menuone,noselect"; completion.completeopt = "menu,menuone,noselect";
__raw = "cmp.mapping.preset.cmdline({ __raw = "cmp.mapping.preset.cmdline({
['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),