mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Add css highlight queries
This commit is contained in:
parent
73ea03fb8d
commit
58f5bdbe01
2 changed files with 73 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ List of currently supported languages:
|
|||
- [ ] swift
|
||||
- [ ] java
|
||||
- [ ] ocaml
|
||||
- [ ] css
|
||||
- [x] css (maintained by @TravonteD)
|
||||
- [ ] julia
|
||||
- [ ] php
|
||||
- [ ] bash
|
||||
|
|
|
|||
72
queries/css/highlights.scm
Normal file
72
queries/css/highlights.scm
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
"@media" @keyword
|
||||
"@import" @include
|
||||
"@charset" @keyword
|
||||
"@namespace" @keyword
|
||||
"@supports" @keyword
|
||||
"@keyframes" @keyword
|
||||
(at_keyword) @keyword
|
||||
(to) @keyword
|
||||
(from) @keyword
|
||||
(important) @keyword
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(tag_name) @type
|
||||
(nesting_selector) @type
|
||||
(universal_selector) @type
|
||||
|
||||
(function_name) @function
|
||||
|
||||
"~" @operator
|
||||
">" @operator
|
||||
"+" @operator
|
||||
"-" @operator
|
||||
"*" @operator
|
||||
"/" @operator
|
||||
"=" @operator
|
||||
"^=" @operator
|
||||
"|=" @operator
|
||||
"~=" @operator
|
||||
"$=" @operator
|
||||
"*=" @operator
|
||||
|
||||
"and" @operator
|
||||
"or" @operator
|
||||
"not" @operator
|
||||
"only" @operator
|
||||
|
||||
(attribute_selector (plain_value) @string)
|
||||
(pseudo_element_selector (tag_name) @property)
|
||||
(pseudo_class_selector (class_name) @property)
|
||||
|
||||
(class_name) @property
|
||||
(id_name) @property
|
||||
(namespace_name) @property
|
||||
(property_name) @property
|
||||
(feature_name) @property
|
||||
(attribute_name) @property
|
||||
|
||||
|
||||
((property_name) @type
|
||||
(match? @type "^--"))
|
||||
((plain_value) @type
|
||||
(match? @type "^--"))
|
||||
|
||||
(string_value) @string
|
||||
(color_value) @string
|
||||
(identifier) @string
|
||||
|
||||
(integer_value) @number
|
||||
(float_value) @number
|
||||
(unit) @string
|
||||
|
||||
"#" @punctuation.delimiter
|
||||
"," @punctuation.delimiter
|
||||
"." @punctuation.delimiter
|
||||
":" @punctuation.delimiter
|
||||
"::" @punctuation.delimiter
|
||||
";" @punctuation.delimiter
|
||||
"{" @punctuation.bracket
|
||||
")" @punctuation.bracket
|
||||
"(" @punctuation.bracket
|
||||
"}" @punctuation.bracket
|
||||
Loading…
Add table
Add a link
Reference in a new issue