question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntelliSense not selecting the first item in completion list

See original GitHub issue

completion

Hitting 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 hitting ctrl+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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
Anas-Alhariricommented, Jan 15, 2021

I found the SOLUTION!

The "editor.snippetSuggestions": is set to inline by default in the defaultSettings.json (the default settings of VS code). It seems that other VS code extensions that provide additional completion options; change this from inline to ‘top’ or something other than the default.

I went to my user settings of VSCode settings.json and changed it back to inline 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)

1reaction
DanTupcommented, Apr 4, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found