Skip to content

Sometimes recommends autocomplete / intellisense for wrong cmdlet #5183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
6 tasks done
o-l-a-v opened this issue May 9, 2025 · 5 comments
Open
6 tasks done

Sometimes recommends autocomplete / intellisense for wrong cmdlet #5183

o-l-a-v opened this issue May 9, 2025 · 5 comments
Labels
Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed!

Comments

@o-l-a-v
Copy link
Contributor

o-l-a-v commented May 9, 2025

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

I often experience that vscode-powershell recommends autocomplete / intellisense for wrong cmdlet. Example just now, seems intellisense is from Add-Member cmdlet and Test-NetConnection? Really messed up.

Image

PowerShell Version

PS > $Host

Name             : Visual Studio Code Host
Version          : 2025.0.0
InstanceId       : 476d96e4-8e7b-477f-8cae-df84de083700
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-SE
CurrentUICulture : en-GB
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.5.1
PSEdition                      Core
GitCommitId                    7.5.1
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS >

Visual Studio Code Version

1.100.0
19e0f9e681ecb8e5c09d8784acaa601316ca4571
x64

Extension Version

ms-vscode.powershell@2025.0.0

Steps to Reproduce

Write PowerShell. Use cmdlets. Often get recommended parameters / autocomplete / intellisense for the wrong cmdlet.

Visuals

No response

Logs

No response

@o-l-a-v o-l-a-v added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels May 9, 2025
@andyleejordan
Copy link
Member

andyleejordan commented May 9, 2025

Note the 'abc' symbol next to it, I'm pretty sure that means that's a word-based suggestion (that is, from VS Code completing out of what thinks are nearby symbols) not an extension-completion. Can you try disabling editor.suggest.showWords?

@JustinGrote
Copy link
Collaborator

You can disable it on a per-language basis too

  "[powershell]": {
    "editor.wordBasedSuggestions": "off",
  },

@o-l-a-v
Copy link
Contributor Author

o-l-a-v commented May 9, 2025

What a useless VSCode feature. I'll try to disable it and see if it makes me happy. Thanks to both. 😊

@JustinGrote
Copy link
Collaborator

It's actually pretty useful in languages that don't have an LSP (or a crappy one). You can also set it to "bottom" so they only show up last.

@o-l-a-v
Copy link
Contributor Author

o-l-a-v commented May 10, 2025

Maybe. Based on my experience with PowerShell it does not seem particularly useful with with intellisense suggestions with no context. Maybe LLMs could improve it, it could understand context a bit better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed!
Projects
None yet
Development

No branches or pull requests

3 participants