aboutsummaryrefslogtreecommitdiffstats
path: root/queries/css
diff options
context:
space:
mode:
authorThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-06-02 21:13:43 +0200
committerGitHub <noreply@github.com>2020-06-02 21:13:43 +0200
commit8763a3163fecb94d71868d9160aa931439cbd636 (patch)
tree5b4a737938f412652c3cd44cc899d53e03740a19 /queries/css
parentMerge pull request #73 from theHamsta/python-locals (diff)
parentAdd css highlight queries (diff)
downloadnvim-treesitter-8763a3163fecb94d71868d9160aa931439cbd636.tar
nvim-treesitter-8763a3163fecb94d71868d9160aa931439cbd636.tar.gz
nvim-treesitter-8763a3163fecb94d71868d9160aa931439cbd636.tar.bz2
nvim-treesitter-8763a3163fecb94d71868d9160aa931439cbd636.tar.lz
nvim-treesitter-8763a3163fecb94d71868d9160aa931439cbd636.tar.xz
nvim-treesitter-8763a3163fecb94d71868d9160aa931439cbd636.tar.zst
nvim-treesitter-8763a3163fecb94d71868d9160aa931439cbd636.zip
Merge pull request #67 from TravonteD/css
Add css highlight queries
Diffstat (limited to 'queries/css')
-rw-r--r--queries/css/highlights.scm72
1 files changed, 72 insertions, 0 deletions
diff --git a/queries/css/highlights.scm b/queries/css/highlights.scm
new file mode 100644
index 000000000..3fc468ca3
--- /dev/null
+++ b/queries/css/highlights.scm
@@ -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