You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you everyone for your effort. Things have started to come together recently and I wanted to test how well this extension works. Looks like syntax highlighting is not complete. TextMate grammar file needs some more regexps/scopes to be able to deliver much "complete" highlighting experience. I'd like to contribute to this and I've even started 😄. I wonder If anyone working on this? If not, I'm gonna continue.
Also, semantic highlighting would be awesome! I'd like to contribute to that too but I haven't dig into the rescript-editor-support yet. I believe that is where the tokenization, type on hover process etc. occurs. Looks like we need that info to make semantic highlighting possible.
P.S: I have no experience in VSCode extension development, language servers etc. Just trying to help and learn new things.
Reacted by Florian Hammerschmidt, Julien Fradin, Torben Ewert, Max T., Paweł Falisz and Carl Johnson
Hello! Thanks for looking at this. Regarding highlighting, currently we'd rather take a correct but minimal approach because the result is highly theme-dependent. There's a huge point of diminishing return where highlighting certain things bloats up the grammar a lot and also causes incorrect coloring in some themes. A bit hard to describe but we can provide the specifics depending on the use-case.
We won't be doing semantic highlighting for now, as it's highly async and can't replace the regular highlighting experience. So we'd end up with 2 systems that highlight differently, with a brief flash in-between...
Thanks for the help! I'll close this for now and you can feel free to open feature-specific issues =)
@chenglou, this is what I'm seeing on the default Dark+ theme:
where the function name, the function parameters, the function return type, and all of the delimiter characters are white. Do you know if this is the expected result, or is there anything I can do to improve the highlighting further?
It's good that you're using the default at least. But yeah it really doesn't highlight things well. No punctuation, no operator, no bracket/braces highlighting even though we've assigned proper scopes to all of these. As a compromise (without messing with what I wrote in that issue), I've made the operators highlight for the default dark+ for now. Might explore further, but yeah, the default themes aren't that great (compared to, say, Sublime Text).
Hi @chenglou, thanks so much for responding. The post you linked was very educational and helps me to understand what's actually going on here, and I fully support the approach you're taking. All of that said, thank you kindly for also making a small tweak to the extent that you were able to without compromising on the simplicity of the grammar that you have to maintain 👍.
Personally, I'm not too bothered about highly colourful IDEs (though they can be very beautiful), but I only thought to investigate what could be done as I noticed that it was taking me longer to mentally parse code I'd previously written. One upside though is that it's caused me to try even harder to further simplify the code I write so it stays readable.
Activity
chenglou commentedon Dec 5, 2020
Hello! Thanks for looking at this. Regarding highlighting, currently we'd rather take a correct but minimal approach because the result is highly theme-dependent. There's a huge point of diminishing return where highlighting certain things bloats up the grammar a lot and also causes incorrect coloring in some themes. A bit hard to describe but we can provide the specifics depending on the use-case.
We won't be doing semantic highlighting for now, as it's highly async and can't replace the regular highlighting experience. So we'd end up with 2 systems that highlight differently, with a brief flash in-between...
Thanks for the help! I'll close this for now and you can feel free to open feature-specific issues =)
dchambers commentedon Feb 3, 2021
@chenglou, this is what I'm seeing on the default Dark+ theme:
where the function name, the function parameters, the function return type, and all of the delimiter characters are white. Do you know if this is the expected result, or is there anything I can do to improve the highlighting further?
chenglou commentedon Feb 7, 2021
Hey @dchambers. Hope you've seen my post at #8 (comment)
It's good that you're using the default at least. But yeah it really doesn't highlight things well. No punctuation, no operator, no bracket/braces highlighting even though we've assigned proper scopes to all of these. As a compromise (without messing with what I wrote in that issue), I've made the operators highlight for the default dark+ for now. Might explore further, but yeah, the default themes aren't that great (compared to, say, Sublime Text).
dchambers commentedon Feb 7, 2021
Hi @chenglou, thanks so much for responding. The post you linked was very educational and helps me to understand what's actually going on here, and I fully support the approach you're taking. All of that said, thank you kindly for also making a small tweak to the extent that you were able to without compromising on the simplicity of the grammar that you have to maintain 👍.
Personally, I'm not too bothered about highly colourful IDEs (though they can be very beautiful), but I only thought to investigate what could be done as I noticed that it was taking me longer to mentally parse code I'd previously written. One upside though is that it's caused me to try even harder to further simplify the code I write so it stays readable.