-
Completion menu pops up when I press enter even in an empty line or when completion menu is not shown. I tried a bunch of combination of completion.trigger settings and only opts = {
appearance = {
use_nvim_cmp_as_default = true,
nerd_font_variant = 'mono'
},
snippets = {
expand = function(snippet) require('luasnip').lsp_expand(snippet) end,
active = function(filter)
if filter and filter.direction then
return require('luasnip').jumpable(filter.direction)
end
return require('luasnip').in_snippet()
end,
jump = function(direction) require('luasnip').jump(direction) end,
},
completion = {
-- 'foo_|_bar' will match 'foo_' for 'prefix' and 'foo__bar' for 'full'
keyword = { range = 'full', },
-- Insert completion item on selection, don't select by default
list = { selection = 'auto_insert' },
-- Show documentation when selecting a completion item
documentation = {
auto_show = true,
auto_show_delay_ms = 0,
window = {
border = "rounded",
}
},
-- Display a preview of the selected item on the current line
ghost_text = { enabled = false },
menu = {
border = "rounded",
-- winhighlight = "Normal:Normal",
draw = {
columns = { { 'kind_icon' }, { 'label' } },
}
},
trigger = {
show_on_keyword = true,
show_on_trigger_character = true,
show_on_x_blocked_trigger_characters = { "'", '"', '(', '\n', '\r' },
},
},
sources = {
default = { 'lsp', 'path', 'luasnip', 'buffer' },
-- Disable cmdline completions
cmdline = {},
},
signature = { enabled = true },
keymap = {
preset = "enter",
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
-- ['<ESC>'] = { 'hide', 'fallback' },
}
},
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
What's your LSP? |
Beta Was this translation helpful? Give feedback.
-
setting |
Beta Was this translation helpful? Give feedback.
-
I had this issue using |
Beta Was this translation helpful? Give feedback.
-
Thank you @Hashino and @gbprod for your help. @gbprod, In my case it was the tpope/vim-endwise. It definitely does something with |
Beta Was this translation helpful? Give feedback.
-
I have this same question. When I run |
Beta Was this translation helpful? Give feedback.
I had this issue using
blink.cmp
with tpope/vim-eunuch, removing this plugin fixed for me.Spotted that using
:imap <cr>
command.