IntelliSense not selecting the first item in completion list
See original GitHub issueHitting Ctrl+Space to bring up the IntelliSense completion list occasionally sets the cursor at the middle of the list, and not at the first item, I end up with a lot of StatefulWidget snippet/Undo combinations 😃
The behavior here is inconsistent [unless there’s some rule it follows that I can’t quite figure out], so here’s my attempt at explaining what I’ve seen:
For the following bit of code:
new Container(
width: 300.0,
height: 100.0,
child: sparkline,
),
- Hitting return after
child: sparkline
and then ctrl+space to trigger a completion:Flutter stateful widget
is selected. - Moving up the list manually and selecting
color
then hitting return to complete it works as expected. - Hitting return after this new
color
entry:Flutter stateful widget
is selected. - Selecting the previously entered
color
line and hitting backspace to clear it - then hittingctrl+space
to bring up intellisense:color
is selected.
It seems to me that it always defaults to Flutter stateful widget
the very first time the completion list is brought up for this class.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Visual studio 2019 preview - auto complete is not selecting the ...
Try Ctrl + Alt + Space , or choose Edit > IntelliSense > Toggle Completion Mode. You can also change to suggestion mode,...
Read more >IntelliSense in Visual Studio Code
The available editor.suggestSelection values are: first - (default) Always select the top list item. recentlyUsed - The previously used item is selected unless ......
Read more >Item not automatically selected in intellisense dropdown
I have to use down arrowkey to select the item and then hit enter to auotcomplete.
Read more >Code completion (IntelliSense) | JetBrains Rider Documentation
When you select items in completion lists using keyboard, the selection will jump to the first item after the last item and vice...
Read more >Visual Studio IntelliSense Not Working? What To Do.
This intelligent code completion tool present in Visual Studio is ... portions of completion list items; Show completion item filters.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found the SOLUTION!
The
"editor.snippetSuggestions":
is set toinline
by default in thedefaultSettings.json
(the default settings of VS code). It seems that other VS code extensions that provide additional completion options; change this frominline
to ‘top’ or something other than the default.I went to my user settings of VSCode
settings.json
and changed it back toinline
and everything works as expected. As a result, the original VSCode completion options came back to the top of the list and you may use Tab or Enter to select them.Hope that my answer helps you 👍
Kind regards to all, Max (Anas Alhariri)
This should be fixed in Code, but looks like it won’t ship until the April release (which is over a month away):
https://github.com/Microsoft/vscode/issues/43429