diff options
| author | Oliver Marshall <olivershawmarshall@gmail.com> | 2021-06-05 16:35:07 +0100 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-07-19 16:24:01 +0000 |
| commit | e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac (patch) | |
| tree | c3c3bdbcb022e8d97c3741104da03cb08633fbdd /queries/clojure | |
| parent | Add some comments & TODOs (diff) | |
| download | nvim-treesitter-e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac.tar nvim-treesitter-e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac.tar.gz nvim-treesitter-e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac.tar.bz2 nvim-treesitter-e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac.tar.lz nvim-treesitter-e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac.tar.xz nvim-treesitter-e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac.tar.zst nvim-treesitter-e5ba6de3a3bd49d727636f5fea6321d8d2a7a6ac.zip | |
Simplify
Diffstat (limited to 'queries/clojure')
| -rw-r--r-- | queries/clojure/highlights.scm | 49 |
1 files changed, 13 insertions, 36 deletions
diff --git a/queries/clojure/highlights.scm b/queries/clojure/highlights.scm index 3aeaec2cf..1e537b8b5 100644 --- a/queries/clojure/highlights.scm +++ b/queries/clojure/highlights.scm @@ -1,39 +1,18 @@ ;; >> Litterals (dis_expr) @comment - (kwd_lit) @symbol - (str_lit) @string - (num_lit) @number - (char_lit) @character - (bool_lit) @boolean - (nil_lit) @constant.builtin - (comment) @comment - (regex_lit) @string.regex -;; TODO: Quote whole quoted symbol? -(quoting_lit - marker: "'" @string.escape) - -(syn_quoting_lit - marker: "`" @string.escape) -(unquoting_lit - marker: "~" @punctuation.special) -(unquote_splicing_lit - marker: "~@" @punctuation.special) +["'" "`"] @string.escape -(set_lit - marker: "#" @punctuation.special) - -(anon_fn_lit - marker: "#" @punctuation.special) +["~" "~@" "#" "^"] @punctuation.special ["{" "}" "[" "]" "(" ")"] @punctuation.bracket @@ -41,13 +20,7 @@ ;; >> Symbols -;; metadata -;; TODO: Mark whole meta tag? -;; TODO: If not, handle java classes? -(meta_lit - marker: "^" @punctuation.special) - -;; parameter-related +; parameter-related ((sym_lit) @parameter (#match? @parameter "^[&]")) @@ -57,7 +30,7 @@ ;; TODO: General symbol highlighting ;; use @variable? ;((sym_lit) @symbol -; (#eq? @symbol @variable)) +; (#not-eq? @symbol @variable)) ;; dynamic variables ((sym_lit) @variable.builtin @@ -82,11 +55,15 @@ . (sym_lit)? @function . + ;; This marks strings twice, should probably fix 🤔 (str_lit)? @text . - ; TODO: Get this working? - (vec_lit - (sym_lit) @parameter)?) + ;; TODO: Get working + [(vec_lit + (sym_lit) @parameter) + (list_lit + (vec_lit + (sym_lit) @parameter))+]?) ;; namespaces @@ -109,13 +86,13 @@ ;; Ordinary calls ;; TODO ;; Do this by having a big scope with all symbols in it and -;; use `#not-eq? @myvar @parameter` +;; use `#not-eq? @myvar @parameter etc` ;; NOTE: That's a big hack ;; Ordinary calls ;; TODO ;; Do this by having a big scope with all symbols in it and -;; use `#not-eq? @myvar @parameter` +;; use `#not-eq? @myvar @parameter etc` ;; Interop (list_lit |
