jaredly / jaredly/reason-language-server
Syntax highlighting inconsistent with active theme
- Dominant language
- OCaml
- Stars
- 649
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
I'm using the "Default Dark+" theme, which (for example) renders comments in a plain green style:

This plugin has all sorts of very idiosyncratic highlighting, including comments in purple italics:

It looks like the source of this is the [`ocaml.json`](https://github.com/jaredly/reason-language-server/blob/eee91d97d14571fbfa82fb913a2437283a48faad/editor-extensions/vscode/ocaml.json) file, which was apparently copied over from a different rev of this plugin? (https://github.com/jaredly/reason-language-server/issues/80#issuecomment-412972708)
Anyway, changing this portion:
```json
"commentBlock": {
"begin": "\\(\\*(?!\\*[^\\)])",
"end": "\\*\\)",
"name": "comment constant.regexp meta.separator.markdown",
"contentName": "emphasis",
"patterns": [
{
"include": "#commentBlock"
},
{
"include": "#commentDoc"
}
]
}
```
…to remove the `contentName` attribute and trim `name` to `comment` yields the expected appearance:

Can I suggest that this `ocaml.json` file (and its analogue for reason code) be replaced with ones that yield theme-consistent highlighting?
I'd be willing to take a shot at this, if this seems reasonable.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the commentBlock definition in editor-extensions/vscode/ocaml.json and compare it with the analogous Reason syntax-highlighting file. Verify that removing the contentName attribute and simplifying the name produces theme-consistent comments in both files, then confirm the resulting highlighting in the VS Code extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100