-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: incorrect syntax highlighting #259
Conversation
3f74e75
to
e73b01b
Compare
Should be ready to merge soon! 👍 (next 2-3 days) |
0d9adb6
to
0e00d08
Compare
3cd8e14
to
43a9da1
Compare
@ful1e5 I think this one is pretty much ready (although it depends on #273 so that should be merged first). I think that further refinements such as tweaking highlights even further, refactoring, or addressing less commonly used languages, etc., can come later if needed. I didn't touch the CHANGELOG. This pr ended up touching many files so it may be easier to view the diffs one commit at a time. Thanks |
28e1972
to
339564c
Compare
Comment-out several redundant hl-group links in: - lua/github-theme/group/syntax.lua - lua/github-theme/group/modules/treesitter.lua These are redundant because they specify links which are identical to Neovim defaults (e.g. `@string --> String`, `@function.call --> @function`, etc.). They are mimicking default links that Neovim already ships and starts-up with. Colorschemes may break Neovim's default links arbitrarily, and `:hi clear` restores them. Since we don't know if/which default links have been broken by the previous colorscheme when loading ours, we should restore these default links—either with `:hi clear`, or manually—before ours is loaded. This already appears to be happening within compiled colorschemes (i.e. `hi clear` gets embedded within them). Furthermore, colorscheme compilation happens automatically by default and cannot be disabled.
Syntax highlighting is still not 100% accurate (due mostly to highlighting differences between different languages which require particular consideration), however, the accuracy of the highlights have been improved, both overall, and in terms of common languages such as: rust, ruby, ecma, c, c#, go, html, css, make, python, and lua. See projekt0n#252
339564c
to
82bb16b
Compare
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.
Please make the necessary changes to README.md#Configuration.
7e64897
to
b4cbfe6
Compare
Oops. Sorry for missing that. |
b4cbfe6
to
cb601d8
Compare
These changes might require multiple PR's in order to: quickly deliver highlight fixes, achieve cleaner/smaller pr's, etc.. Feedback and suggestions are welcomed!
It may be possible to refactor all of the
palette/*
files into a single file? Although I'm not sure if this is something that is wanted or desired, plus after all is said and done, there may remain some custom differences/tweaks among the different colorschemes when it comes to the non-syntax colors/highlights within these files? So for now, I am thinking that it may be best to simply put such questions (of refactoring, etc.) off until later, and in the meantime just develop a new file/module containing all of the common mappings (from hl-group to primer primitives color) that will then berequired()
within each of thepalette/*
files.Todo's, Notes, Ideas, Considerations, Etc.
rgb()
andrgba()
color strings (not applicable to pl syntax colors)TODO
commentsSee #252