feat!: drop modules, general refactor and cleanup

This commit is contained in:
Christian Clason 2023-06-12 09:54:30 -06:00
parent 310f0925ec
commit 692b051b09
1247 changed files with 6096 additions and 9074 deletions

View file

@ -0,0 +1,10 @@
[
; top-level block statements from https://github.com/tree-sitter/tree-sitter-css/blob/master/grammar.js
; note: (block) is not used due to unideal behavior when node before block node spans multiple lines
(rule_set)
(at_rule)
(supports_statement)
(media_statement)
(keyframe_block)
(import_statement)+
] @fold

View file

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

View file

@ -0,0 +1,11 @@
[
(block)
(declaration)
] @indent.begin
(block
"}" @indent.branch)
"}" @indent.dedent
(comment) @indent.ignore

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))