mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(css): make the highlights more sensible
This commit is contained in:
parent
fa38f4e6f9
commit
505a0e74cb
3 changed files with 31 additions and 25 deletions
|
|
@ -5,19 +5,32 @@
|
|||
"@supports"
|
||||
"@keyframes"
|
||||
(at_keyword)
|
||||
] @keyword.directive
|
||||
|
||||
"@import" @keyword.import
|
||||
|
||||
[
|
||||
(to)
|
||||
(from)
|
||||
] @keyword
|
||||
|
||||
"@import" @keyword.import
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(tag_name) @tag
|
||||
|
||||
(class_name) @type
|
||||
|
||||
(id_name) @constant
|
||||
|
||||
[
|
||||
(property_name)
|
||||
(feature_name)
|
||||
] @property
|
||||
|
||||
[
|
||||
(tag_name)
|
||||
(nesting_selector)
|
||||
(universal_selector)
|
||||
] @type
|
||||
] @character.special
|
||||
|
||||
(function_name) @function
|
||||
|
||||
|
|
@ -50,26 +63,20 @@
|
|||
|
||||
(pseudo_element_selector
|
||||
"::"
|
||||
(tag_name) @property)
|
||||
(tag_name) @attribute)
|
||||
|
||||
(pseudo_class_selector
|
||||
(class_name) @property)
|
||||
(class_name) @attribute)
|
||||
|
||||
[
|
||||
(class_name)
|
||||
(id_name)
|
||||
(property_name)
|
||||
(feature_name)
|
||||
(attribute_name)
|
||||
] @property
|
||||
(attribute_name) @tag.attribute
|
||||
|
||||
(namespace_name) @module
|
||||
|
||||
((property_name) @type.definition
|
||||
(#lua-match? @type.definition "^[-][-]"))
|
||||
((property_name) @variable
|
||||
(#lua-match? @variable "^[-][-]"))
|
||||
|
||||
((plain_value) @type
|
||||
(#lua-match? @type "^[-][-]"))
|
||||
((plain_value) @variable
|
||||
(#lua-match? @variable "^[-][-]"))
|
||||
|
||||
[
|
||||
(string_value)
|
||||
|
|
@ -77,10 +84,9 @@
|
|||
(unit)
|
||||
] @string
|
||||
|
||||
[
|
||||
(integer_value)
|
||||
(float_value)
|
||||
] @number
|
||||
(integer_value) @number
|
||||
|
||||
(float_value) @number.float
|
||||
|
||||
[
|
||||
"#"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
(id) @constant
|
||||
|
||||
(class) @property
|
||||
(class) @type
|
||||
|
||||
(doctype) @keyword.directive
|
||||
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
(block_prepend
|
||||
(keyword)+ @keyword)
|
||||
|
||||
(block_name) @type
|
||||
(block_name) @module
|
||||
|
||||
(conditional
|
||||
(keyword) @keyword.conditional)
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
(css_identifier) @function
|
||||
|
||||
(css_property
|
||||
name: (css_property_name) @attribute)
|
||||
name: (css_property_name) @property)
|
||||
|
||||
(css_property
|
||||
value: (css_property_value) @attribute)
|
||||
value: (css_property_value) @string)
|
||||
|
||||
[
|
||||
(expression)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue