Introduce storage highlighting for typescript/javascript (#2961)

pull/2802/head^2
Jake Langford 2 years ago committed by GitHub
parent e35abe38f3
commit 230ba264bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -151,7 +151,9 @@ We use a similar set of scopes as
- `operator` - `or`, `in` - `operator` - `or`, `in`
- `directive` - Preprocessor directives (`#if` in C) - `directive` - Preprocessor directives (`#if` in C)
- `function` - `fn`, `func` - `function` - `fn`, `func`
- `storage` - Keywords that affect the storage of a variable, function or data structure `static`, `mut`, `const`, `ref` - `storage` - Keywords describing how things are stored
- `type` - The type of something, `class`, `function`, `var`, `let`, etc.
- `modifier` - Storage modifiers like `static`, `mut`, `const`, `ref`, etc.
- `operator` - `||`, `+=`, `>` - `operator` - `||`, `+=`, `>`

@ -163,19 +163,14 @@
[ [
"as" "as"
"async" "async"
"class"
"const"
"debugger" "debugger"
"delete" "delete"
"export"
"extends" "extends"
"from" "from"
"function" "function"
"get" "get"
"import"
"in" "in"
"instanceof" "instanceof"
"let"
"new" "new"
"of" "of"
"set" "set"
@ -183,11 +178,17 @@
"target" "target"
"try" "try"
"typeof" "typeof"
"var"
"void" "void"
"with" "with"
] @keyword ] @keyword
[
"class"
"let"
"const"
"var"
] @keyword.storage.type
[ [
"switch" "switch"
"case" "case"
@ -206,3 +207,9 @@
"do" "do"
"await" "await"
] @keyword.control ] @keyword.control
[
"import"
"export"
] @keyword.control.import

@ -22,15 +22,21 @@
[ [
"abstract" "abstract"
"declare" "declare"
"enum"
"export" "export"
"implements" "implements"
"interface"
"keyof" "keyof"
"namespace" "namespace"
] @keyword
[
"type"
"interface"
"enum"
] @keyword.storage.type
[
"public"
"private" "private"
"protected" "protected"
"public"
"type"
"readonly" "readonly"
] @keyword ] @keyword.storage.modifier
Loading…
Cancel
Save