Attempt to generate some stylesheets from nvim treesitter files
The problem with just adding a language to the language.toml is that there will still be no highlighting until someone makes a stylesheet
I see. Is it possible to generate sytlesheet from https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries?
Originally posted by @Freed-Wu in https://github.com/foxfriends/syncat/issues/12#issuecomment-1783170520
any progress on this?
I have no plan to do this currently. You're welcome to try :)
i would, but i know zero rust lol
Generating these stylesheets could probably be done in any language, as a separate script rather than part of syncat program itself... but still requires learning how nvim does its queries and also how syncat does its queries and then translating the two... haha quite a bit of work
hmmmm, well, i can start working on it, have you written like a full spec for the syncat style stuff, i'm working on translating the ecma/javascript query, but i'm stuck because some rules seem to be overriding others
https://github.com/foxfriends/syncat-themes?tab=readme-ov-file#creating-themes
I believe the most comprehensive documentation for syncat themes is in there^
Spend a couple hours on this. This is a hard problem.
- As mentioned before - nvim queries are laid out like this: less specific > more specific. Syncat styles work the opposite way. More specific highlights should go first
- Secondly, parsing the queries is very non-trivial. My approaches with simple regexes didn't work. Looks like it needs a dedicated parser.
Was there a good reason to have a bespoke solution?
Was there a good reason to have a bespoke solution?
not particularly, syncat was just something to build for fun. more fun to build something than to read docs on someone else's project
Was there a good reason to have a bespoke solution?
not particularly, syncat was just something to build for fun. more fun to build something than to read docs on someone else's project
Fair enough. A very good idea though. Shame it's not more actively developed