foxfriends / syncat

Syntax aware cat
MIT License
53 stars 2 forks source link

Attempt to generate some stylesheets from nvim treesitter files #13

Open foxfriends opened 1 year ago

foxfriends commented 1 year ago

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

brainlessbitch commented 7 months ago

any progress on this?

foxfriends commented 7 months ago

I have no plan to do this currently. You're welcome to try :)

brainlessbitch commented 7 months ago

i would, but i know zero rust lol

foxfriends commented 7 months ago

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

brainlessbitch commented 7 months ago

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

foxfriends commented 7 months ago

https://github.com/foxfriends/syncat-themes?tab=readme-ov-file#creating-themes

I believe the most comprehensive documentation for syncat themes is in there^