Feature Request: Expose parameters to the Outline View #5153 - #2340
Open
darlingtonogbuefi wants to merge 1 commit into
Open
Feature Request: Expose parameters to the Outline View #5153#2340darlingtonogbuefi wants to merge 1 commit into
darlingtonogbuefi wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The behavior change is correctly feature-gated (default off) and is covered by targeted regression tests for both modes.
Pull request overview
Adds an opt-in Language Server setting to include PowerShell function parameters as symbols in the LSP DocumentSymbol “Outline” view, keeping the existing default behavior unchanged.
Changes:
- Introduces
EnableParameterOutlineonLanguageServerSettingsand wires it into settings updates. - Updates
PsesDocumentSymbolHandlerto includeSymbolType.Parameterdeclarations only when the setting is enabled. - Adds regression coverage (enabled/disabled) plus a shared
.ps1fixture containing typed and untyped parameters.
File summaries
| File | Description |
|---|---|
| test/PowerShellEditorServices.Test/Language/DocumentSymbolHandlerTests.cs | Adds tests asserting parameter symbols are excluded by default and included when enabled. |
| test/PowerShellEditorServices.Test.Shared/Symbols/DocumentSymbolParameters.ps1 | Adds a minimal fixture script with a function containing parameters to drive symbol generation. |
| src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs | Adds EnableParameterOutline and includes it in LanguageServerSettings.Update(). |
| src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentSymbolHandler.cs | Injects ConfigurationService and gates inclusion of parameter symbols on EnableParameterOutline. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Implements the PowerShell Editor Services portion of #5153 by adding optional support for displaying function parameters in the Outline view.
Changes
EnableParameterOutlinetoLanguageServerSettings.PsesDocumentSymbolHandlerto include parameter symbols when enabled.Testing
Targeted tests:
dotnet test test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj --filter "FullyQualifiedName~DocumentSymbolHandlerTests"Result:
The full test suite was also run and reported two unrelated failures:
DebuggerAcceptsInlineScriptFindsDetailsForBuiltInCommandPR Context
Related issue
PowerShell/vscode-powershell#5153