microsoft / microsoft/TypeScript-TmLanguage
Incorrect syntax highlighting JSDoc comments `@default { }`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 471
- Forks
- 149
- PR merge metrics
- No merged PRs in 30d
Description
Type: Bug
/** @default { open: "---", close: "---" } */
Highlighting works (kind of but not really) if I remove the whitespace like this:
/** @default {open:"---",close:"---"} */
Note that this ^^^ syntax highlighting is incorrect! Correct syntax highlighting looks like this:
Which is achieved by writing:
/**
* @default
* { open: "---", close: "---" }
*/
For simple reproduction use:
/** @default { } */
VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes: Unsupported
Contributor guide
No contributing guide indexed for this repository
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
Start by reproducing the issue with the provided @default { } and spaced object examples in VS Code. Inspect the TypeScript TextMate grammar files described by the repository and adjust the relevant JSDoc matching so inline object values receive the same correct highlighting as the multiline form; verify the reproduction examples afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100