Repository navigation
Help needed updating Clojure grammar #8093
Replies: 3 comments
|
This should not require touching Go code. Linguist treats highlighting grammars as TextMate-compatible vendor grammars, and the documented replacement path is For Clojure specifically, script/add-grammar --replace language-clojure https://github.com/BetterThanTomorrow/calvaIf the script clones Calva but does not auto-detect the grammar because Calva keeps it at The PR should also include at least a small Clojure sample under bundle exec rake testTwo caveats that will matter for review:
If this is the path you were looking for, please mark it as answered so the grammar replacement process is easier to find. |
|
The process for changing the source of a grammar is clearly documented in the CONTRIBUTING.md file: Changing the source of a syntax highlighting grammar. Follow those instructions and you should be good, but before you do, fix your grammar as @yudin-s suggested. It's not in the expected format for a TextMate or VSCode compatible grammar and can't be used as-is. As this is a new grammar, we will not accept changes to Linguist (ie the Go changes you hinted at) to accommodate your incorrectly laid-out grammar. |
Uh oh!
There was an error while loading. Please reload this page.
Hi folks,
The current grammar for clojure and its dialects in
linguistis the archived one from atom and has now become a bit stale.The good news is that the
calvaextension for vscode has a fresh one that is well maintained and contains 5yr of bug fixes the atom one misses.I tried the scripts in the docs for replacing it, but seems it need a little push to find the right file. for calva it is
/clojure.tmLanguage.json, aftercp vendor/grammars/calva/clojure.tmLanguage.json vendor/grammars/calva/grammars/clojure.jsonit worksI'm not well versed in go, but it it seems to be already some structure for this in linguist but i'm not sure how to configure it.
Would be nice if the grammars could be replaced anyway as some bindings are not highlighted correctly
thanks <3
All reactions