changeset 6739:423233883798

Update scss and highlights (#13414)
author Erasin Wang <erasinoo@gmail.com>
date Sat, 26 Apr 2025 23:35:31 +0800
parents 6efd502bf320
children 45365fd5b445
files languages.toml runtime/queries/scss/highlights.scm
diffstat 2 files changed, 61 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/languages.toml	Tue Apr 22 15:10:48 2025 +0900
+++ b/languages.toml	Sat Apr 26 23:35:31 2025 +0800
@@ -887,7 +887,7 @@
 name = "css"
 scope = "source.css"
 injection-regex = "css"
-file-types = ["css", "scss"]
+file-types = ["css"]
 block-comment-tokens = { start = "/*", end = "*/" }
 language-servers = [ "vscode-css-language-server" ]
 auto-format = true
--- a/runtime/queries/scss/highlights.scm	Tue Apr 22 15:10:48 2025 +0900
+++ b/runtime/queries/scss/highlights.scm	Sat Apr 26 23:35:31 2025 +0800
@@ -1,47 +1,64 @@
 [(comment) (single_line_comment)] @comment
 
-"~" @operator
-">" @operator
-"+" @operator
-"-" @operator
-"*" @operator
-"/" @operator
-"=" @operator
-"^=" @operator
-"|=" @operator
-"~=" @operator
-"$=" @operator
-"*=" @operator
+[
+ "~"
+ ">"
+ "+"
+ "-"
+ "*"
+ "/"
+ "="
+ "^="
+ "|="
+ "~="
+ "$="
+ "*="
+] @operator
 
-"in" @operator
-"and" @operator
-"or" @operator
-"not" @operator
-"only" @operator
+[
+  "in"
+  "and"
+  "or"
+  "not"
+  "only"
+] @operator.control
 
-"@apply" @constant.builtin
-"@at-root" @constant.builtin
-"@charset" @constant.builtin
-"@debug" @constant.builtin
-"@each" @keyword.control.repeat
-"@else" @keyword.control.conditional
-"@error" @constant.builtin
-"@extend" @constant.builtin
-"@for" @keyword.control.repeat
-"@forward" @keyword.control.import
+[
+  "@apply"
+  "@at-root"
+  "@charset"
+  "@debug"
+  "@error"
+  "@extend"
+  "@keyframes"
+  "@media"
+  "@mixin"
+  "@supports"
+  "@warn"
+] @constant.builtin
+
+[
+  "@import"
+  "@include"
+  "@forward"
+  "@use"
+] @keyword.control.import
+
+[
+  "@if"
+  "@else"
+] @keyword.control.conditional
+
+[
+  "@each"
+  "@for"
+  "@while"
+] @keyword.control.repeat
+
+"@return" @keyword.control.return
+
 "@function" @function.method
-"@if" @keyword.control.conditional
-"@import" @keyword.control.import
-"@include" @keyword.control.import
-"@keyframes" @constant.builtin
-"@media" @constant.builtin
-"@mixin" @constant.builtin
 "@namespace" @namespace
-"@return" @keyword.control.return
-"@supports" @constant.builtin
-"@use" @keyword.control.import
-"@warn" @constant.builtin
-"@while" @keyword.control.repeat
 
 (property_name) @variable.other.member
 
@@ -58,10 +75,11 @@
 (pseudo_class_selector) @attribute
 
 (identifier) @variable
-(class_name) @variable
-(id_name) @variable
-(namespace_name) @variable
-(feature_name) @variable
+(class_name) @label
+(id_name) @label
+(namespace_name) @namespace
+
+(feature_name) @variable.other.member
 (variable) @variable
 (variable_name) @variable.other.member
 (variable_value) @variable.other.member