-
Notifications
You must be signed in to change notification settings - Fork 514
Support unloaded enums and classes in Intellisense #2312
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
Comments
@cdelcambre thanks for opening this issue, and providing repro steps! I want to ensure that I understand what intellisense you are looking for/expecting, because I am having some trouble reproducing the issue It would be great if you could attach a gif/screenshot or a description of what intellisense you are looking for--thanks! |
Thank you for looking into this @SydneyhSmith! Your screen shots are exactly what I am hoping for but I don't get what you get on the function functAutoSenseBroke. For both I get a long list of nonsense parameter name suggestions I could definitely live without. Typing the text of the parameter I am looking for narrows down the noise. Perhaps that's a symptom of my problem because I don't see that long list of noise suggestions in your screen shots. Maybe I have a config issue? This is a clean install done today of both VS code and PowerShell extension. All default settings. VS Code Details: |
I reported a similar issue in #2117 . For arguments sake I tried your example and have the same issue, there simply is no argument or parameter completion on the function Enum AzureSqlEdition {
Standard
Premium
Basic
}
Function Get-Stuff {
[CmdLetBinding()]
Param (
[Parameter(Mandatory)]
[AzureSqlEdition]$DbType,
[Parameter(Mandatory)]
[string]$OtherParameter
)
$PSBoundParameters
} The completion is simply not done in the editor pane when typing partially But in the In the But the same problem is happening when typing in the This is happening on
|
Yeah completion acts differently when the source is also in the text it's trying to complete for. If you:
Then it'll probably act same. A very similar issue is PowerShell/PowerShell#10567. This is something that needs to be corrected in PowerShell itself (the engine provides the API that does all of vscode-powershell's completions) |
Closing as an external fix in PowerShell |
Uh oh!
There was an error while loading. Please reload this page.
VSCode Version: 1.40.1
OS Version: Windows 10, 1903
Powershell Extension: 2019.11.0
Steps to Reproduce:
Create an Enum
Create a function which references that Enum as a parameter.
Call that function, there will be no autosense when populating the parameters and values for said function.
Simple Example
The text was updated successfully, but these errors were encountered: