Fixed tags

This commit is contained in:
Maurício Szabo 2024-04-30 19:06:06 -03:00
parent 781060e01b
commit 9e70a723c7
3 changed files with 53 additions and 4 deletions

View File

@ -95,7 +95,7 @@
(list_lit (list_lit
"(" @punctuation.section.expression.begin (#is-not? test.descendantOfNodeWithData "clojure.dismissTag") "(" @punctuation.section.expression.begin (#is-not? test.descendantOfNodeWithData "clojure.dismissTag")
. .
(sym_lit) @keyword.control (#match? @keyword.control "^def(on[^\s]*|test|macro|n|n-|)$") (sym_lit) @keyword.control (#match? @keyword.control "^def(on[^\s]*|test|macro|n|n-|protocol|record|struct|)$")
. .
(sym_lit) @meta.definition.global @entity.global (sym_lit) @meta.definition.global @entity.global
")" @punctuation.section.expression.end) ")" @punctuation.section.expression.end)

View File

@ -1,7 +1,47 @@
(list_lit (list_lit
"(" (#is-not? test.descendantOfNodeWithData "clojure.dismissTag") "(" (#is-not? test.descendantOfNodeWithData "clojure.dismissTag")
. .
(sym_lit) @keyword.control (#match? @keyword.control "^def(on[^\s]*|test|macro|n|n-|)$") (sym_lit) @keyword.control (#match? @keyword.control "defmacro")
. .
(sym_lit) @definition.function (sym_lit) @name
")") ")") @definition.constructor
(list_lit
"(" (#is-not? test.descendantOfNodeWithData "clojure.dismissTag")
.
(sym_lit) @keyword.control (#match? @keyword.control "def(protocol|struct|record)")
.
(sym_lit) @name
")") @definition.struct
(list_lit
"(" (#is-not? test.descendantOfNodeWithData "clojure.dismissTag")
.
(sym_lit) @keyword.control (#match? @keyword.control "^def(on[^\s]*|test|macro|n|n-)$")
.
(sym_lit) @name
")") @definition.function
(list_lit
"(" (#is-not? test.descendantOfNodeWithData "clojure.dismissTag")
.
(sym_lit) @keyword.control (#match? @keyword.control "^def(on[^\s]*|test|macro|n|n-)$")
.
(sym_lit) @name
")") @definition.variable
(list_lit
"(" @punctuation.section.expression.begin (#is-not? test.descendantOfNodeWithData "clojure.dismissTag")
.
(sym_lit) @keyword.control (#match? @keyword.control "/def.")
.
(sym_lit) @name
")") @definition.function
(list_lit
"(" @punctuation.section.expression.begin (#is-not? test.descendantOfNodeWithData "clojure.dismissTag")
.
(sym_lit) @keyword.control (#match? @keyword.control "/def")
.
(sym_lit) @name
")") @definition.variable

View File

@ -38,6 +38,15 @@
; ^ keyword.control ; ^ keyword.control
; ^ entity.global ; ^ entity.global
(defprotocol FooBar
; ^ keyword.control
; ^ entity.global
(-eq [this other]))
(defrecord Lol [a b])
; ^ keyword.control
; ^ entity.global
(def a "A STRING") (def a "A STRING")
; <- keyword.control ; <- keyword.control
; ^ entity.global ; ^ entity.global