Some comments and fixes

This commit is contained in:
Maurício Szabo 2023-05-22 20:16:36 -03:00
parent 354f63c590
commit 001bf57bdf

View File

@ -1,4 +1,4 @@
;; Collections
;; Function calls
(anon_fn_lit
"(" @punctuation.section.expression.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
.
@ -11,24 +11,11 @@
(sym_lit) @entity.name.function @meta.expression
")" @punctuation.section.expression.end)
(vec_lit
"[" @punctuation.section.vector.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
"]" @punctuation.section.vector.end)
@meta.vector
(map_lit
"{" @punctuation.section.map.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
"}" @punctuation.section.map.end)
@meta.map
(set_lit
("#" "{") @punctuation.section.set.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
"}" @punctuation.section.set.end)
@meta.map
; Includes
; NS things like require
((sym_name) @meta.symbol (#eq? @meta.symbol "import") (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")) @keyword.control
((sym_name) @meta.symbol (#eq? @meta.symbol "require") (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")) @keyword.control
;; USE
((sym_name)
@meta.symbol
(#eq? @meta.symbol "use")
@ -43,6 +30,7 @@
(#set! test.onlyIfNotDescendantOfNodeWithData clojure.dismissTag))
@keyword.control
;; Namespace declaration
((list_lit
"(" @punctuation.section.expression.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
.
@ -60,6 +48,7 @@
(#set! test.onlyIfDescendantOfNodeWithData isNamespace)
(#set! test.onlyIfConfig language-clojure.markDeprecations))
;; Definition
(list_lit
"(" @punctuation.section.expression.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
.
@ -68,20 +57,7 @@
(sym_lit) @meta.definition.global @entity.global
")" @punctuation.section.expression.end)
((regex_lit) @string.regexp (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((sym_lit) @meta.symbol (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((kwd_lit) @constant.keyword (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((str_lit) @string.quoted.double (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((num_lit) @constant.numeric (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((nil_lit) @constant.numeric (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((bool_lit) @constant.language (#set! test.onlyIfNotDescendantOfNodeWithData clojure.dismissTag))
(comment) @comment.line.semicolon
((dis_expr)
@comment.block.clojure
(#set! test.onlyIfConfig language-clojure.dismissTag)
(#set! clojure.dismissTag true)
(#set! test.final true))
;; Comment form ("Rich" comments)
((list_lit
"(" @punctuation.section.expression.begin
.
@ -98,4 +74,38 @@
(#set! test.onlyIfNotConfig language-clojure.commentTag)
")" @punctuation.section.expression.end)
;;; COPY-PASTED from edn-highlights.
;; IF you need to add something here, add to edn-highlights
;; and then paste here, but DON'T PASTE the first `list_lit`
;; Collections
(vec_lit
"[" @punctuation.section.vector.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
"]" @punctuation.section.vector.end)
@meta.vector
(map_lit
"{" @punctuation.section.map.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
"}" @punctuation.section.map.end)
@meta.map
(set_lit
("#" "{") @punctuation.section.set.begin (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag")
"}" @punctuation.section.set.end)
@meta.set
((regex_lit) @string.regexp (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((sym_lit) @meta.symbol (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((kwd_lit) @constant.keyword (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((str_lit) @string.quoted.double (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((num_lit) @constant.numeric (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((nil_lit) @constant.language (#set! test.onlyIfNotDescendantOfNodeWithData "clojure.dismissTag"))
((bool_lit) @constant.language (#set! test.onlyIfNotDescendantOfNodeWithData clojure.dismissTag))
(comment) @comment.line.semicolon
((dis_expr)
@comment.block.clojure
(#set! test.onlyIfConfig language-clojure.dismissTag)
(#set! clojure.dismissTag true)
(#set! test.final true))
("ERROR" @invalid.illegal)