This commit is contained in:
Oliver Marshall 2021-06-05 16:35:07 +01:00 committed by Stephan Seitz
parent 99185fcf7d
commit 0cf75fd96d

View file

@ -1,39 +1,18 @@
;; >> Litterals ;; >> Litterals
(dis_expr) @comment (dis_expr) @comment
(kwd_lit) @symbol (kwd_lit) @symbol
(str_lit) @string (str_lit) @string
(num_lit) @number (num_lit) @number
(char_lit) @character (char_lit) @character
(bool_lit) @boolean (bool_lit) @boolean
(nil_lit) @constant.builtin (nil_lit) @constant.builtin
(comment) @comment (comment) @comment
(regex_lit) @string.regex (regex_lit) @string.regex
;; TODO: Quote whole quoted symbol? ["'" "`"] @string.escape
(quoting_lit
marker: "'" @string.escape)
(syn_quoting_lit ["~" "~@" "#" "^"] @punctuation.special
marker: "`" @string.escape)
(unquoting_lit
marker: "~" @punctuation.special)
(unquote_splicing_lit
marker: "~@" @punctuation.special)
(set_lit
marker: "#" @punctuation.special)
(anon_fn_lit
marker: "#" @punctuation.special)
["{" "}" "[" "]" "(" ")"] @punctuation.bracket ["{" "}" "[" "]" "(" ")"] @punctuation.bracket
@ -41,13 +20,7 @@
;; >> Symbols ;; >> Symbols
;; metadata ; parameter-related
;; TODO: Mark whole meta tag?
;; TODO: If not, handle java classes?
(meta_lit
marker: "^" @punctuation.special)
;; parameter-related
((sym_lit) @parameter ((sym_lit) @parameter
(#match? @parameter "^[&]")) (#match? @parameter "^[&]"))
@ -57,7 +30,7 @@
;; TODO: General symbol highlighting ;; TODO: General symbol highlighting
;; use @variable? ;; use @variable?
;((sym_lit) @symbol ;((sym_lit) @symbol
; (#eq? @symbol @variable)) ; (#not-eq? @symbol @variable))
;; dynamic variables ;; dynamic variables
((sym_lit) @variable.builtin ((sym_lit) @variable.builtin
@ -82,11 +55,15 @@
. .
(sym_lit)? @function (sym_lit)? @function
. .
;; This marks strings twice, should probably fix 🤔
(str_lit)? @text (str_lit)? @text
. .
; TODO: Get this working? ;; TODO: Get working
(vec_lit [(vec_lit
(sym_lit) @parameter)?) (sym_lit) @parameter)
(list_lit
(vec_lit
(sym_lit) @parameter))+]?)
;; namespaces ;; namespaces
@ -109,13 +86,13 @@
;; Ordinary calls ;; Ordinary calls
;; TODO ;; TODO
;; Do this by having a big scope with all symbols in it and ;; 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 ;; NOTE: That's a big hack
;; Ordinary calls ;; Ordinary calls
;; TODO ;; TODO
;; Do this by having a big scope with all symbols in it and ;; 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 ;; Interop
(list_lit (list_lit