Closed letzabelin closed 3 years ago
the problem was in completion-nvim confirm key
@letzabelin Please provide your solution, I am facing the same issue.
@cloggier you can try the following:
-- Disable the default behavior
vim.g.completion_confirm_key = ""
-- And set the confirm key to Enter with the condition
vim.api.nvim_set_keymap("i", "<cr>", [[pumvisible() ? complete_info()["selected"] != "-1" ? "\<Plug>(completion_confirm_completion)" : "\<C-e>\<cr>" : "\<cr>"]], { expr = true })
@letzabelin Works, thanks(!), but seems to break snippet expansion on <CR>
.
Base configuration
Example in JS, JSX, TS, TSX:
I'm tapping '{' bracket, then tapping 'Enter' and see next: { |} // | - cursor
How can i solve this problem?