nvim-treesitter/queries/css/highlights.scm
Pham Huy Hoang 107e61afb7 refactor: Remove all (ERROR) @error captures
As discussed in PR#5421, capturing `@error` is inconsistent, requiring
deep nesting (or priority) in order to correctly have red backgrounds to
it.

Some queries has this capture, some don't. For consistency purposes,
removing all of them is more preferable.

For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)`
to your custom queries.
2023-10-25 18:18:50 +02:00

89 lines
986 B
Scheme

[
"@media"
"@charset"
"@namespace"
"@supports"
"@keyframes"
(at_keyword)
(to)
(from)
] @keyword
"@import" @include
(comment) @comment @spell
[
(tag_name)
(nesting_selector)
(universal_selector)
] @type
(function_name) @function
[
"~"
">"
"+"
"-"
"*"
"/"
"="
"^="
"|="
"~="
"$="
"*="
"and"
"or"
"not"
"only"
] @operator
(important) @type.qualifier
(attribute_selector (plain_value) @string)
(pseudo_element_selector "::" (tag_name) @property)
(pseudo_class_selector (class_name) @property)
[
(class_name)
(id_name)
(property_name)
(feature_name)
(attribute_name)
] @property
(namespace_name) @namespace
((property_name) @type.definition
(#lua-match? @type.definition "^[-][-]"))
((plain_value) @type
(#lua-match? @type "^[-][-]"))
[
(string_value)
(color_value)
(unit)
] @string
[
(integer_value)
(float_value)
] @number
[
"#"
","
"."
":"
"::"
";"
] @punctuation.delimiter
[
"{"
")"
"("
"}"
] @punctuation.bracket