If you're using lsp-zero you might wanna give this a try if you haven't yet.
https://lsp-zero.netlify.app/docs/autocomplete.html#use-enter-to-confirm-completion
In essence, by default the selections from the suggested dropdowns can be confirmed using <C-y>, but you can also map something like Enter (<CR>) to it, using custom mappings.
I'm not entirely certain how the integration of below would look in your linked config, so here's just an example from my own .config/nvim/after/plugin/lsp.lua
file
local cmp = require('cmp')
cmp.setup({
-- There may be other settings in your setup too,
-- but below is what offers the custom mapping
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({select = true}),
}),
})
The mapping section above e.g. just binds Enter
to confirm the top suggested entry without having to select it. Likewise, setting it to false would simply mean you'd have to choose an entry in the list before being able to confirm using Enter
.
I can at least confirm this to be working on my setup, also together with lsp-zero