jaredly / jaredly/reason-language-server

Syntax highlighting inconsistent with active theme

Open
#233 1 comment 0 reactions 0 assignees View on GitHub
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:

![screenshot from 2019-01-23 11-37-47](https://user-images.githubusercontent.com/47489/51621908-7f24ec80-1f03-11e9-93e6-ebfd9ae6f34a.png)

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

![screenshot from 2019-01-23 11-38-37](https://user-images.githubusercontent.com/47489/51622147-03776f80-1f04-11e9-9345-b31a27419f3b.png)

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:

![screenshot from 2019-01-23 11-48-09](https://user-images.githubusercontent.com/47489/51622518-c52e8000-1f04-11e9-9385-ec289c4bf808.png)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.