:language 'css
'((string_value) @font-lock-string-face)
+ :feature 'keyword
+ :language 'css
+ '(["@media"
+ "@import"
+ "@charset"
+ "@namespace"
+ "@keyframes"] @font-lock-builtin-face
+ ["and"
+ "or"
+ "not"
+ "only"
+ "selector"] @font-lock-keyword-face)
+
:feature 'variable
:language 'css
'((plain_value) @font-lock-variable-name-face)
+ :language 'css
+ :feature 'operator
+ `(["=" "~=" "^=" "|=" "*=" "$="] @font-lock-operator-face)
+
:feature 'selector
:language 'css
'((class_selector) @css-selector
:language 'css
'((integer_value) @font-lock-number-face
(float_value) @font-lock-number-face
- (unit) @font-lock-constant-face)
+ (unit) @font-lock-constant-face
+ (important) @font-lock-builtin-face)
+
+ :feature 'query
+ :language 'css
+ '((keyword_query) @font-lock-property-face
+ (feature_name) @font-lock-property-face)
+
+
+ :feature 'bracket
+ :language 'css
+ '((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
:feature 'error
:language 'css
(setq-local treesit-defun-type-regexp "rule_set")
(setq-local treesit-font-lock-settings css--treesit-settings)
(setq-local treesit-font-lock-feature-list
- '((selector comment)
+ '((selector comment query keyword)
(property constant string)
- (error variable function)))
+ (error variable function operator bracket)))
;; Tree-sitter-css, for whatever reason, cannot reliably return
;; the captured nodes in a given range (it instead returns the
;; nodes preceding range). Before this is fixed in