VS code will by default trigger IntelliSense when you start typing, however you can turn this off and only have it get triggered when certain characters are typed. This is controlled by the following settings:
Type in $ or Get- or $global: and notice how none of them trigger IntelliSense.
Type in "". or C:\ and notice that IntelliSense is triggered as expected.
Prerequisites
Summary
VS code will by default trigger IntelliSense when you start typing, however you can turn this off and only have it get triggered when certain characters are typed. This is controlled by the following settings:
If you set these settings and try to edit the VS code settings.json file you will see that IntelliSense is automatically triggered when you type in
"
but not when you type normal words, so it works exactly as you'd expect. In PowerShell the only trigger characters that work are.
and\
but there are more triggers defined in editor services: https://github.com/PowerShell/PowerShellEditorServices/blob/main/src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs#L56This setting used to work just fine back in 2021 when I added
$
as a trigger character: https://github.com/PowerShell/PowerShellEditorServices/pull/1427 but I have no idea when it stopped working.PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Configure the following VS code settings:
Type in
$
orGet-
or$global:
and notice how none of them trigger IntelliSense. Type in"".
orC:\
and notice that IntelliSense is triggered as expected.Visuals
No response
Logs
No response