Revert "Extract syntax highlighting properties from tree-sitter highlight queries (#2797)"
This reverts commit45c635872b, reversing changes made tof2b82369f2.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
operator: "@"
|
||||
operand: (call
|
||||
target: (identifier) @unary
|
||||
(.match? @unary "^(doc)$"))
|
||||
(#match? @unary "^(doc)$"))
|
||||
) @context
|
||||
.
|
||||
(call
|
||||
@@ -18,10 +18,10 @@
|
||||
target: (identifier) @name)
|
||||
operator: "when")
|
||||
])
|
||||
(.match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
|
||||
(#match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
|
||||
)
|
||||
|
||||
(call
|
||||
target: (identifier) @name
|
||||
(arguments (alias) @name)
|
||||
(.match? @name "^(defmodule|defprotocol)$")) @item
|
||||
(#match? @name "^(defmodule|defprotocol)$")) @item
|
||||
|
||||
@@ -54,13 +54,13 @@
|
||||
(sigil_name) @__name__
|
||||
quoted_start: _ @string
|
||||
quoted_end: _ @string
|
||||
(.match? @__name__ "^[sS]$")) @string
|
||||
(#match? @__name__ "^[sS]$")) @string
|
||||
|
||||
(sigil
|
||||
(sigil_name) @__name__
|
||||
quoted_start: _ @string.regex
|
||||
quoted_end: _ @string.regex
|
||||
(.match? @__name__ "^[rR]$")) @string.regex
|
||||
(#match? @__name__ "^[rR]$")) @string.regex
|
||||
|
||||
(sigil
|
||||
(sigil_name) @__name__
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
(
|
||||
(identifier) @comment.unused
|
||||
(.match? @comment.unused "^_")
|
||||
(#match? @comment.unused "^_")
|
||||
)
|
||||
|
||||
(call
|
||||
@@ -91,7 +91,7 @@
|
||||
operator: "|>"
|
||||
right: (identifier))
|
||||
])
|
||||
(.match? @keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$"))
|
||||
(#match? @keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$"))
|
||||
|
||||
(binary_operator
|
||||
operator: "|>"
|
||||
@@ -99,15 +99,15 @@
|
||||
|
||||
(call
|
||||
target: (identifier) @keyword
|
||||
(.match? @keyword "^(def|defdelegate|defexception|defguard|defguardp|defimpl|defmacro|defmacrop|defmodule|defn|defnp|defoverridable|defp|defprotocol|defstruct)$"))
|
||||
(#match? @keyword "^(def|defdelegate|defexception|defguard|defguardp|defimpl|defmacro|defmacrop|defmodule|defn|defnp|defoverridable|defp|defprotocol|defstruct)$"))
|
||||
|
||||
(call
|
||||
target: (identifier) @keyword
|
||||
(.match? @keyword "^(alias|case|cond|else|for|if|import|quote|raise|receive|require|reraise|super|throw|try|unless|unquote|unquote_splicing|use|with)$"))
|
||||
(#match? @keyword "^(alias|case|cond|else|for|if|import|quote|raise|receive|require|reraise|super|throw|try|unless|unquote|unquote_splicing|use|with)$"))
|
||||
|
||||
(
|
||||
(identifier) @constant.builtin
|
||||
(.match? @constant.builtin "^(__MODULE__|__DIR__|__ENV__|__CALLER__|__STACKTRACE__)$")
|
||||
(#match? @constant.builtin "^(__MODULE__|__DIR__|__ENV__|__CALLER__|__STACKTRACE__)$")
|
||||
)
|
||||
|
||||
(unary_operator
|
||||
@@ -121,7 +121,7 @@
|
||||
(sigil)
|
||||
(boolean)
|
||||
] @comment.doc))
|
||||
(.match? @__attribute__ "^(moduledoc|typedoc|doc)$"))
|
||||
(#match? @__attribute__ "^(moduledoc|typedoc|doc)$"))
|
||||
|
||||
(comment) @comment
|
||||
|
||||
@@ -150,4 +150,4 @@
|
||||
((sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @embedded)
|
||||
(.eq? @_sigil_name "H"))
|
||||
(#eq? @_sigil_name "H"))
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
((sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @content)
|
||||
(.eq? @_sigil_name "H")
|
||||
(.set! language "heex"))
|
||||
(#eq? @_sigil_name "H")
|
||||
(#set! language "heex"))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(call
|
||||
target: (identifier) @context
|
||||
(arguments (alias) @name)
|
||||
(.match? @context "^(defmodule|defprotocol)$")) @item
|
||||
(#match? @context "^(defmodule|defprotocol)$")) @item
|
||||
|
||||
(call
|
||||
target: (identifier) @context
|
||||
@@ -23,4 +23,4 @@
|
||||
")" @context.extra))
|
||||
operator: "when")
|
||||
])
|
||||
(.match? @context "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
|
||||
(#match? @context "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
|
||||
|
||||
Reference in New Issue
Block a user