PowerShell / PowerShell/vscode-powershell

Semantic Syntax is incorrectly highlighting arguments as commands

Open
#2,860 20 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Semantic Highlighting Issue-Bug
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Any bare (unquoted) string argument that has a - in it is being highlighted as a command:

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example in VS Code with a bare, unquoted argument containing a hyphen, then trace the TypeScript semantic-syntax highlighting path; the issue names no file or test. Done means such arguments are highlighted as arguments rather than commands, without regressing command highlighting.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.