-
Notifications
You must be signed in to change notification settings - Fork 298
Feature/change token format #1705
Feature/change token format #1705
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1705 +/- ##
=========================================
+ Coverage 44.76% 45.3% +0.53%
=========================================
Files 351 353 +2
Lines 14301 14426 +125
Branches 1865 1885 +20
=========================================
+ Hits 6402 6535 +133
+ Misses 7673 7668 -5
+ Partials 226 223 -3
Continue to review full report at Codecov.
|
if only passed single word also add more token types for reasonml
add functionality to parse the token colors format
d6c52c9
to
18aac4b
Compare
…sibility principle
prettify comments into jsDoc blocks
be explicit about passing in the token colors and default to the service
this makes the component (TokenThemeProvider) more testable
add passing jest-styled-components test
update jest and use test.each for classname testing
make get Css Rule should actually return a css rule and not occasionally a boolean
Granted tests pass, I believe this is done (for now... from reading around there are loads of tweaks that could be made to improve how we highlight in the long run). -> side note for my future self or anyone who wants to look at it in |
I've given this a quick look over, but is there anything specific you want a second look at? |
@CrossR I think my main goal was to avoid breaking any of the syntax highlighting whilst allowing for the use of editor tokens from vscode themes, so that we can copy their editor tokens into our oni themes and they should match the highlighting (almost*) means with this PR anyone making a port of a theme can get really good highlighting by borrowing the tokens.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looked good and didn't seem to have broken anything, and the code changes look sensible.
Perhaps its worth sticking a disclaimer in the insiders chat on discord, just so people can be aware and maybe they'll spot something we didn't, since as you've said a lot of the highlighting stuff seems to change very very randomly.
Excited for this, the highlighting looks much nicer!
Will post a little message on discord anyone who uses |
Following discussions in #1443 to match oni's
editor.tokenColors
to match withvscode
's syntax to allow for cross compatibility withvscode
themes this PR changes the theme format to match as well as aims to merge the user, default and theme tokens with priority and as a test adds the editor tokens fromvscode/onedark.theme.json
Made a lot of progress here and this PR now uses a
TokenScorer
to determine which of the available scopes in a list should render for a symbol in a line, this change means that syntax highlighting nearly matches vscode/atom (not accounting for treesitter)Oni
VSCode
Todo: