Update Clojure highlighting to match upstreamed PR

See https://github.com/sogaiu/tree-sitter-clojure/pull/20
pull/185/head
Wilfred Hughes 2022-03-26 23:50:55 +07:00
parent ec2b72bff2
commit b6cd8c9a42
2 changed files with 28 additions and 3 deletions

@ -4,7 +4,7 @@
Difftastic no longer shows "1/1" when a file only has a single hunk.
Improved Scala syntax highlighting.
Improved Clojure and Scala syntax highlighting.
When a file is entirely unchanged, difftastic now shows "no changes"
even if it successfully parsed. Previously it would only show "no

@ -1,7 +1,32 @@
;; Basic, limited highlighting for Clojure.
;; TODO: submit upstream.
(comment) @comment
(str_lit) @string
;; Literals
(num_lit) @number
[
(char_lit)
(str_lit)
] @string
[
(bool_lit)
(nil_lit)
] @constant.builtin
(kwd_lit) @constant
;; Comments
(comment) @comment
;; Treat quasiquotation as operators for the purpose of highlighting.
[
"'"
"`"
"~"
"@"
"~@"
] @operator