microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.97k stars 28.77k forks source link

No Pre-selection on Manual IntelliSense Trigger #223339

Open morgilad opened 2 months ago

morgilad commented 2 months ago

There are three different reasons for triggering IntelliSense:

  1. QuickSuggestion: Triggered by user input.
  2. TriggerCharacter: Triggered by specific characters (in our case, space, dot, and open parenthesis).
  3. Manual Trigger: Triggered manually after a previous selection using editor.trigger('monaco-kusto', 'editor.action.triggerSuggest', {}).

Currently, the first item is always selected when manually triggering IntelliSense (the third option). While there is an option to customize the selection behavior for the first two reasons (QuickSuggestion and TriggerCharacter), this customization is missing for the manual trigger. It would be beneficial to have no item selected initially when IntelliSense is triggered manually. This feature was implemented in the past, as noted in this GitHub issue, but was removed for some reason.

Requesting the addition of this feature to allow for no item to be selected initially when triggering IntelliSense manually.

isidorn commented 4 days ago

Assuming | is part of the completion you might be able to use 'editor.action.triggerSuggest' as suggestion command. Such triggering is considered automatic and then the selectionMode setting applies.

@morgilad so my advice is to make sure that | is part of the completion. And then use the 'editor.action.triggerSuggest' as the suggestion command. Stop manually triggering editor.action.triggerSuggest.

Please try it out and let us know how it goes. Thank you