ecosse3 / nvim

A non-minimal Neovim config built to work most efficiently with Frontend Development
GNU General Public License v3.0
1.22k stars 107 forks source link

Turn Off Autocomplete First Item Selection on Enter Key Press #38

Closed willdavidow closed 2 years ago

willdavidow commented 2 years ago

I'm running into an issue where whatever plugin is being used to offer autocompletion suggestions is also automatically selecting the first one if I press the enter key, which is inserting a lot of extra text into my normal editing workflow that I then have to go back and delete...

Is there a way to turn this off?

image

If I press enter it inserts the extra blah entires instead of breaking onto the next line... I realize some people may want the "select first suggestion on enter" functionality, but I do not because in a lot of cases it's causing a bunch of extra text to be entered that I don't want there.

ecosse3 commented 2 years ago

Hi, thanks for the issue. It's a configuration of nvim-cmp. Actually after you mentioned that issue, it started annoying me too so I disabled that by default 😄

The setting for that is inside lua/plugins/cmp.lua. I changed that here: https://github.com/ecosse3/nvim/commit/4e834de7b1c87bc82baafa2a86ab50c508cc0e35

Happy coding!

ecosse3 commented 2 years ago

I have also added EcoVim configuration variable to easily change it: https://github.com/ecosse3/nvim/commit/44b00951a1a175cdc33103cc948d6fbc03c44988

willdavidow commented 2 years ago

Awesome - thanks for pointing me in the right direction, and for making it configurable so quickly!