jaredly / reason-language-server

A language server for reason, in reason
MIT License
659 stars 84 forks source link

[vscode] Syntax highlighting breaks with (_ [@bs.as "foo"]) in external #288

Open donut opened 5 years ago

donut commented 5 years ago

Using (_ [@bs.as "foo"]) as part of an external declaration breaks further syntax highlighting:

Screen Shot 2019-05-22 at 1105 45

Adding (* "\"" *) right after the problematic external declaration returns things to normal.

donut commented 5 years ago

Messed around some more and also realized that the screenshot I posted was also messed up by the [@@bs.val] external declaration. See https://github.com/jaredly/reason-language-server/issues/189

If the fixed value is an empty string or a string with just whitespace, there's no issue:

Screen Shot 2019-05-31 at 1243 24

But if the fixed string value has any non-whitespace characters, we run into the problem:

Screen Shot 2019-05-31 at 1240 03

And finally, the comment fix can be added within the [@bs.as] tag:

Screen Shot 2019-05-31 at 1241 37