PowerShell / PowerShell/vscode-powershell
Highlight related keywords under cursor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
Some keywords relate to each other, like "break" or "continue" inside a loop statement. It would be nice if these keywords got highlighted when placing the cursor on them just like it happens in VS and VScode when writing C# code. Here's an example:
This makes it easier to tell at a glance which loop I'm breaking out of in a nested loop scenario.
The scenarios that C# covers from my memory are:
1: Obvious pairs (if/else, try/catch/finally)
2: Return statements inside methods
3: Loops and flow control statements
All 3 seem like they would be pretty simple to handle with some AST analysis, however because PowerShell has loop labels extra care should be taken when determining what loop the flow control statements relate to.
Proposed Design
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the extension's existing keyword-highlighting and syntax/AST handling, then compare the requested if/else, try/catch/finally, return, and loop-flow cases, including labeled PowerShell loops; done means related keywords highlight at the cursor without incorrect matches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100