VS Code accept suggestion on enter not working [duplicate]
Asked Answered
C

4

7

Normally, pressing enter accepts a suggestion on intellisense, but when I press enter, it does not accept the suggestion and inserts a line break.

On pressing enter, I want to accept to the currently selected suggestion and automatically write it to the current cursor postion. How can this be done?

Centime answered 30/12, 2022 at 21:2 Comment(0)
A
7

Unchecking Editor > Suggest: Snippets Prevent Quick Suggestions (editor.suggest.snippetsPreventQuickSuggestions) in the Settings fixed it for me.

enter image description here

According to one of the devs, this has already been fixed and will be shipped in June 2023.

Accident answered 16/5, 2023 at 15:18 Comment(0)
F
0

Go to File>Preferences>Settings and make sure that Accept Suggestions On Enter is on. VSCode Accept Suggestion On Enter option

Fredric answered 14/2, 2023 at 5:43 Comment(2)
it's already on but there is no difference still not working, but thats happening just on PHP, VsC works fine 15 min but after 15 minute suggestion geting uselessCentime
I have the same issue. it is really annoying. However I noticed that when the suggestion menu opens I can navigate to the answer that I want with keyboard arrows and then click enter. The process is still annoying but it works at least and does not goes to the next line every time you need to use a suggestion.Anaphylaxis
I
0

This only happens in PHP, so I use the arrow keys to navigate and then click on the suggestion. It's not the best solution, but it works.

Ivar answered 19/3, 2023 at 23:27 Comment(0)
E
0

This issue is already opened in github: https://github.com/microsoft/vscode/issues/173387

For now they resolved this problem in 1.79-insiders version, not 1.78-stable. I don't know when they release this bugfix but for now I have an idea for auto selecting the first item in the suggestion list. If you press CTRL+SPACE then first item will be selected. For example you're typing something, suggestion list opened but it didn't select the first element. Now press CTRL+SPACE and the first item will be selected. Then press ENTER.

Yes this isn't best solution but for now I'm using this method and may be another developers like this.

Educationist answered 7/5, 2023 at 13:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.