diff --git a/extensions/rust/cgmanifest.json b/extensions/rust/cgmanifest.json
index 5181efba1c40a961b51b7ebb122a3c0a0c4fbc30..ec6bab93af3233e5724dfa0191d5c413a44e3f31 100644
--- a/extensions/rust/cgmanifest.json
+++ b/extensions/rust/cgmanifest.json
@@ -4,14 +4,14 @@
"component": {
"type": "git",
"git": {
- "name": "language-rust",
- "repositoryUrl": "https://github.com/zargony/atom-language-rust",
- "commitHash": "7d59e2ad79fbe5925bd2fd3bd3857bf9f421ff6f"
+ "name": "rust-syntax",
+ "repositoryUrl": "https://github.com/dustypomerleau/rust-syntax",
+ "commitHash": "f3eb2221c8c334f1aae1fbc7af9a6c0b753bb29b"
}
},
"license": "MIT",
- "description": "The files syntaxes/rust.tmLanguage.json was derived from the Atom package https://atom.io/packages/language-rust.",
- "version": "0.4.12"
+ "description": "A TextMate-style grammar for Rust.",
+ "version": "0.2.10"
}
],
"version": 1
diff --git a/extensions/rust/package.json b/extensions/rust/package.json
index 6607838817574d7380d268f4bef13a47af9b166d..431e9fa203cf47860dead79253b00f7689518092 100644
--- a/extensions/rust/package.json
+++ b/extensions/rust/package.json
@@ -5,21 +5,32 @@
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
- "engines": { "vscode": "*" },
+ "engines": {
+ "vscode": "*"
+ },
"scripts": {
- "update-grammar": "node ../../build/npm/update-grammar.js zargony/atom-language-rust grammars/rust.cson ./syntaxes/rust.tmLanguage.json"
+ "update-grammar": "node ../../build/npm/update-grammar.js dustypomerleau/rust-syntax syntaxes/rust.tmLanguage.json ./syntaxes/rust.tmLanguage.json"
},
"contributes": {
- "languages": [{
- "id": "rust",
- "extensions": [".rs"],
- "aliases": ["Rust", "rust"],
- "configuration": "./language-configuration.json"
- }],
- "grammars": [{
- "language": "rust",
- "path": "./syntaxes/rust.tmLanguage.json",
- "scopeName":"source.rust"
- }]
+ "languages": [
+ {
+ "id": "rust",
+ "extensions": [
+ ".rs"
+ ],
+ "aliases": [
+ "Rust",
+ "rust"
+ ],
+ "configuration": "./language-configuration.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "rust",
+ "path": "./syntaxes/rust.tmLanguage.json",
+ "scopeName": "source.rust"
+ }
+ ]
}
-}
\ No newline at end of file
+}
diff --git a/extensions/rust/syntaxes/rust.tmLanguage.json b/extensions/rust/syntaxes/rust.tmLanguage.json
index 784bd8c9aca7527a0d12328e29240fb57d2178fd..f952d4d83995a5424883afdef018a51cbcfdd2f6 100644
--- a/extensions/rust/syntaxes/rust.tmLanguage.json
+++ b/extensions/rust/syntaxes/rust.tmLanguage.json
@@ -1,690 +1,1069 @@
{
"information_for_contributors": [
- "This file has been converted from https://github.com/zargony/atom-language-rust/blob/master/grammars/rust.cson",
+ "This file has been converted from https://github.com/dustypomerleau/rust-syntax/blob/master/syntaxes/rust.tmLanguage.json",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
- "version": "https://github.com/zargony/atom-language-rust/commit/7d59e2ad79fbe5925bd2fd3bd3857bf9f421ff6f",
+ "version": "https://github.com/dustypomerleau/rust-syntax/commit/f3eb2221c8c334f1aae1fbc7af9a6c0b753bb29b",
"name": "Rust",
"scopeName": "source.rust",
"patterns": [
{
- "comment": "Implementation",
- "begin": "\\b(impl)\\b",
- "end": "\\{",
+ "comment": "boxed slice literal",
+ "begin": "(<)(\\[)",
"beginCaptures": {
"1": {
- "name": "storage.type.rust"
+ "name": "punctuation.brackets.angle.rust"
+ },
+ "2": {
+ "name": "punctuation.brackets.square.rust"
+ }
+ },
+ "end": ">",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.brackets.angle.rust"
}
},
"patterns": [
{
- "include": "#block_comment"
+ "include": "#block-comments"
},
{
- "include": "#line_comment"
+ "include": "#comments"
},
{
- "include": "#sigils"
+ "include": "#gtypes"
},
{
- "include": "#mut"
+ "include": "#lvariables"
},
{
- "include": "#dyn"
+ "include": "#lifetimes"
},
{
- "include": "#ref_lifetime"
+ "include": "#punctuation"
},
{
- "include": "#core_types"
- },
- {
- "include": "#core_marker"
+ "include": "#types"
+ }
+ ]
+ },
+ {
+ "comment": "macro type metavariables",
+ "name": "meta.macro.metavariable.type.rust",
+ "match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|pat|path|stmt|tt|ty|vis))?",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.macro.dollar.rust"
},
- {
- "include": "#core_traits"
+ "3": {
+ "name": "keyword.other.crate.rust"
},
- {
- "include": "#std_types"
+ "4": {
+ "name": "entity.name.type.metavariable.rust"
},
- {
- "include": "#std_traits"
+ "6": {
+ "name": "keyword.operator.key-value.rust"
},
+ "7": {
+ "name": "variable.other.metavariable.specifier.rust"
+ }
+ },
+ "patterns": [
{
- "include": "#type_params"
+ "include": "#keywords"
+ }
+ ]
+ },
+ {
+ "comment": "macro metavariables",
+ "name": "meta.macro.metavariable.rust",
+ "match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|pat|path|stmt|tt|ty|vis))?",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.macro.dollar.rust"
},
- {
- "include": "#where"
+ "2": {
+ "name": "variable.other.metavariable.name.rust"
},
- {
- "name": "storage.type.rust",
- "match": "\\bfor\\b"
+ "4": {
+ "name": "keyword.operator.key-value.rust"
},
+ "5": {
+ "name": "variable.other.metavariable.specifier.rust"
+ }
+ },
+ "patterns": [
{
- "include": "#type"
+ "include": "#keywords"
}
]
},
{
- "include": "#block_doc_comment"
- },
- {
- "include": "#block_comment"
- },
- {
- "include": "#line_doc_comment"
- },
- {
- "include": "#line_comment"
+ "comment": "macro rules",
+ "name": "meta.macro.rules.rust",
+ "match": "\\b(macro_rules!)\\s+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\\s+(\\{)",
+ "captures": {
+ "1": {
+ "name": "entity.name.function.macro.rules.rust"
+ },
+ "3": {
+ "name": "entity.name.function.macro.rust"
+ },
+ "4": {
+ "name": "entity.name.type.macro.rust"
+ },
+ "5": {
+ "name": "punctuation.brackets.curly.rust"
+ }
+ }
},
{
- "comment": "Attribute",
+ "comment": "attributes",
"name": "meta.attribute.rust",
- "begin": "#\\!?\\[",
+ "begin": "(#)(\\!?)(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.attribute.rust"
+ },
+ "2": {
+ "name": "keyword.operator.attribute.inner.rust"
+ },
+ "3": {
+ "name": "punctuation.brackets.attribute.rust"
+ }
+ },
"end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.brackets.attribute.rust"
+ }
+ },
"patterns": [
{
- "include": "#string_literal"
+ "include": "#keywords"
},
{
- "include": "#block_doc_comment"
+ "include": "#punctuation"
},
{
- "include": "#block_comment"
+ "include": "#strings"
},
{
- "include": "#line_doc_comment"
+ "include": "#gtypes"
},
{
- "include": "#line_comment"
+ "include": "#types"
}
]
},
{
- "comment": "Single-quote string literal (character)",
- "name": "string.quoted.single.rust",
- "match": "b?'([^'\\\\]|\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.))'"
- },
- {
- "include": "#string_literal"
- },
- {
- "include": "#raw_string_literal"
- },
- {
- "comment": "Floating point literal (fraction)",
- "name": "constant.numeric.float.rust",
- "match": "\\b[0-9][0-9_]*\\.[0-9][0-9_]*([eE][+-]?[0-9_]+)?(f32|f64)?\\b"
- },
- {
- "comment": "Floating point literal (exponent)",
- "name": "constant.numeric.float.rust",
- "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?[eE][+-]?[0-9_]+(f32|f64)?\\b"
- },
- {
- "comment": "Floating point literal (typed)",
- "name": "constant.numeric.float.rust",
- "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?([eE][+-]?[0-9_]+)?(f32|f64)\\b"
- },
- {
- "comment": "Integer literal (decimal)",
- "name": "constant.numeric.integer.decimal.rust",
- "match": "\\b[0-9][0-9_]*([ui](8|16|32|64|128|s|size))?\\b"
- },
- {
- "comment": "Integer literal (hexadecimal)",
- "name": "constant.numeric.integer.hexadecimal.rust",
- "match": "\\b0x[a-fA-F0-9_]+([ui](8|16|32|64|128|s|size))?\\b"
- },
- {
- "comment": "Integer literal (octal)",
- "name": "constant.numeric.integer.octal.rust",
- "match": "\\b0o[0-7_]+([ui](8|16|32|64|128|s|size))?\\b"
- },
- {
- "comment": "Integer literal (binary)",
- "name": "constant.numeric.integer.binary.rust",
- "match": "\\b0b[01_]+([ui](8|16|32|64|128|s|size))?\\b"
- },
- {
- "comment": "Static storage modifier",
- "name": "storage.modifier.static.rust",
- "match": "\\bstatic\\b"
- },
- {
- "comment": "Boolean constant",
- "name": "constant.language.boolean.rust",
- "match": "\\b(true|false)\\b"
- },
- {
- "comment": "Control keyword",
- "name": "keyword.control.rust",
- "match": "\\b(async|await|break|continue|else|if|in|for|loop|match|return|try|while)\\b"
- },
- {
- "comment": "Keyword",
- "name": "keyword.other.rust",
- "match": "\\b(crate|extern|mod|let|ref|use|super|move)\\b"
- },
- {
- "comment": "Reserved keyword",
- "name": "invalid.deprecated.rust",
- "match": "\\b(abstract|alignof|become|do|final|macro|offsetof|override|priv|proc|pure|sizeof|typeof|virtual|yield)\\b"
- },
- {
- "include": "#unsafe"
- },
- {
- "include": "#sigils"
- },
- {
- "include": "#self"
- },
- {
- "include": "#mut"
- },
- {
- "include": "#dyn"
- },
- {
- "include": "#impl"
- },
- {
- "include": "#box"
- },
- {
- "include": "#lifetime"
- },
- {
- "include": "#ref_lifetime"
- },
- {
- "include": "#const"
+ "comment": "modules",
+ "match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
+ "captures": {
+ "1": {
+ "name": "keyword.control.rust"
+ },
+ "2": {
+ "name": "entity.name.module.rust"
+ }
+ }
},
{
- "include": "#pub"
+ "comment": "external crate imports",
+ "name": "meta.import.rust",
+ "begin": "\\b(extern)\\s+(crate)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.rust"
+ },
+ "2": {
+ "name": "keyword.other.crate.rust"
+ }
+ },
+ "end": ";",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.semi.rust"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block-comments"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#keywords"
+ },
+ {
+ "include": "#punctuation"
+ }
+ ]
},
{
- "comment": "Miscellaneous operator",
- "name": "keyword.operator.misc.rust",
- "match": "(=>|::|\\bas\\b)"
+ "comment": "use statements",
+ "name": "meta.use.rust",
+ "begin": "\\b(use)\\s",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.rust"
+ }
+ },
+ "end": ";",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.semi.rust"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block-comments"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#keywords"
+ },
+ {
+ "include": "#namespaces"
+ },
+ {
+ "include": "#punctuation"
+ },
+ {
+ "include": "#types"
+ },
+ {
+ "include": "#lvariables"
+ }
+ ]
},
{
- "comment": "Comparison operator",
- "name": "keyword.operator.comparison.rust",
- "match": "(&&|\\|\\||==|!=)"
+ "include": "#block-comments"
},
{
- "comment": "Assignment operator",
- "name": "keyword.operator.assignment.rust",
- "match": "(\\+=|-=|/=|\\*=|%=|\\^=|&=|\\|=|<<=|>>=|=)"
+ "include": "#comments"
},
{
- "comment": "Arithmetic operator",
- "name": "keyword.operator.arithmetic.rust",
- "match": "(!|\\+|-|/|\\*|%|\\^|&|\\||<<|>>)"
+ "include": "#lvariables"
},
{
- "comment": "Comparison operator (second group because of regex precedence)",
- "name": "keyword.operator.comparison.rust",
- "match": "(<=|>=|<|>)"
+ "include": "#constants"
},
{
- "include": "#core_types"
+ "include": "#gtypes"
},
{
- "include": "#core_vars"
+ "include": "#functions"
},
{
- "include": "#core_marker"
+ "include": "#types"
},
{
- "include": "#core_traits"
+ "include": "#keywords"
},
{
- "include": "#std_types"
+ "include": "#lifetimes"
},
{
- "include": "#std_traits"
+ "include": "#macros"
},
{
- "comment": "Built-in macro",
- "name": "support.function.builtin.rust",
- "match": "\\b(macro_rules|compile_error|format_args|env|option_env|concat_idents|concat|line|column|file|stringify|include|include_str|include_bytes|module_path|cfg)!"
+ "include": "#namespaces"
},
{
- "comment": "Core macro",
- "name": "support.function.core.rust",
- "match": "\\b(panic|assert|assert_eq|assert_ne|debug_assert|debug_assert_eq|debug_assert_ne|try|write|writeln|unreachable|unimplemented)!"
+ "include": "#punctuation"
},
{
- "comment": "Standard library macro",
- "name": "support.function.std.rust",
- "match": "\\b(format|print|println|eprint|eprintln|select|vec)!"
+ "include": "#strings"
},
{
- "comment": "Logging macro",
- "name": "support.function.log.rust",
- "match": "\\b(log|error|warn|info|debug|trace|log_enabled)!"
+ "include": "#variables"
+ }
+ ],
+ "repository": {
+ "comments": {
+ "patterns": [
+ {
+ "comment": "documentation comments",
+ "name": "comment.line.documentation.rust",
+ "match": "^\\s*///.*"
+ },
+ {
+ "comment": "line comments",
+ "name": "comment.line.double-slash.rust",
+ "match": "\\s*//.*"
+ }
+ ]
},
- {
- "comment": "Invokation of a macro",
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*\\!)\\s*[({\\[]",
- "captures": {
- "1": {
- "name": "entity.name.function.macro.rust"
+ "block-comments": {
+ "patterns": [
+ {
+ "comment": "block comments",
+ "name": "comment.block.rust",
+ "begin": "/\\*(?!\\*)",
+ "end": "\\*/",
+ "patterns": [
+ {
+ "include": "#block-comments"
+ }
+ ]
+ },
+ {
+ "comment": "block documentation comments",
+ "name": "comment.block.documentation.rust",
+ "begin": "/\\*\\*",
+ "end": "\\*/",
+ "patterns": [
+ {
+ "include": "#block-comments"
+ }
+ ]
}
- }
+ ]
},
- {
- "comment": "Function call",
- "match": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*\\(",
- "captures": {
- "1": {
- "name": "entity.name.function.rust"
+ "constants": {
+ "patterns": [
+ {
+ "comment": "ALL CAPS constants",
+ "name": "constant.other.caps.rust",
+ "match": "\\b[A-Z]{2}[A-Z0-9_]*\\b"
+ },
+ {
+ "comment": "constant declarations",
+ "match": "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b",
+ "captures": {
+ "1": {
+ "name": "keyword.control.rust"
+ },
+ "2": {
+ "name": "constant.other.caps.rust"
+ }
+ }
+ },
+ {
+ "comment": "decimal integers and floats",
+ "name": "constant.numeric.decimal.rust",
+ "match": "\\b\\d[\\d_]*(\\.?)[\\d_]*(?:(E)([+-])([\\d_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
+ "captures": {
+ "1": {
+ "name": "punctuation.separator.dot.decimal.rust"
+ },
+ "2": {
+ "name": "keyword.operator.exponent.rust"
+ },
+ "3": {
+ "name": "keyword.operator.exponent.sign.rust"
+ },
+ "4": {
+ "name": "constant.numeric.decimal.exponent.mantissa.rust"
+ },
+ "5": {
+ "name": "entity.name.type.numeric.rust"
+ }
+ }
+ },
+ {
+ "comment": "hexadecimal integers",
+ "name": "constant.numeric.hex.rust",
+ "match": "\\b0x[\\da-fA-F_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.numeric.rust"
+ }
+ }
+ },
+ {
+ "comment": "octal integers",
+ "name": "constant.numeric.oct.rust",
+ "match": "\\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.numeric.rust"
+ }
+ }
+ },
+ {
+ "comment": "binary integers",
+ "name": "constant.numeric.bin.rust",
+ "match": "\\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.numeric.rust"
+ }
+ }
+ },
+ {
+ "comment": "booleans",
+ "name": "constant.language.bool.rust",
+ "match": "\\btrue|false\\b"
}
- }
+ ]
},
- {
- "comment": "Function call with type parameters",
- "begin": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*(::)(?=\\s*<.*>\\s*\\()",
- "end": "\\(",
+ "escapes": {
+ "comment": "escapes: ASCII, byte, Unicode, quote, regex",
+ "name": "constant.character.escape.rust",
+ "match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
"captures": {
"1": {
- "name": "entity.name.function.rust"
+ "name": "constant.character.escape.backslash.rust"
},
"2": {
- "name": "keyword.operator.misc.rust"
+ "name": "constant.character.escape.bit.rust"
+ },
+ "3": {
+ "name": "constant.character.escape.unicode.rust"
+ },
+ "4": {
+ "name": "constant.character.escape.unicode.punctuation.rust"
+ },
+ "5": {
+ "name": "constant.character.escape.unicode.punctuation.rust"
}
- },
+ }
+ },
+ "functions": {
"patterns": [
{
- "include": "#type_params"
+ "comment": "pub as a function",
+ "match": "\\b(pub)(\\()",
+ "captures": {
+ "1": {
+ "name": "keyword.other.rust"
+ },
+ "2": {
+ "name": "punctuation.brackets.round.rust"
+ }
+ }
+ },
+ {
+ "comment": "function definition",
+ "name": "meta.function.definition.rust",
+ "begin": "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.fn.rust"
+ },
+ "2": {
+ "name": "entity.name.function.rust"
+ },
+ "4": {
+ "name": "punctuation.brackets.round.rust"
+ },
+ "5": {
+ "name": "punctuation.brackets.angle.rust"
+ }
+ },
+ "end": "\\{",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.brackets.curly.rust"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block-comments"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#keywords"
+ },
+ {
+ "include": "#lvariables"
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#gtypes"
+ },
+ {
+ "include": "#functions"
+ },
+ {
+ "include": "#lifetimes"
+ },
+ {
+ "include": "#macros"
+ },
+ {
+ "include": "#namespaces"
+ },
+ {
+ "include": "#punctuation"
+ },
+ {
+ "include": "#strings"
+ },
+ {
+ "include": "#types"
+ },
+ {
+ "include": "#variables"
+ }
+ ]
+ },
+ {
+ "comment": "function/method calls, chaining",
+ "name": "meta.function.call.rust",
+ "begin": "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "entity.name.function.rust"
+ },
+ "2": {
+ "name": "punctuation.brackets.round.rust"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.brackets.round.rust"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block-comments"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#keywords"
+ },
+ {
+ "include": "#lvariables"
+ },
+ {
+ "include": "#namespaces"
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#gtypes"
+ },
+ {
+ "include": "#functions"
+ },
+ {
+ "include": "#lifetimes"
+ },
+ {
+ "include": "#macros"
+ },
+ {
+ "include": "#punctuation"
+ },
+ {
+ "include": "#strings"
+ },
+ {
+ "include": "#types"
+ },
+ {
+ "include": "#variables"
+ }
+ ]
}
]
},
- {
- "comment": "Function definition",
- "begin": "\\b(fn)\\s+([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)",
- "end": "[\\{;]",
- "beginCaptures": {
- "1": {
- "name": "keyword.other.fn.rust"
- },
- "2": {
- "name": "entity.name.function.rust"
- }
- },
+ "keywords": {
"patterns": [
{
- "include": "#block_comment"
+ "comment": "control flow keywords",
+ "name": "keyword.control.rust",
+ "match": "\\b(async|await|break|continue|do|else|for|if|loop|match|move|return|try|where|while|yield)\\b"
},
{
- "include": "#line_comment"
+ "comment": "storage keywords",
+ "name": "storage.type.rust",
+ "match": "\\b(const|enum|extern|let|macro|mod|struct|trait|type)\\b"
},
{
- "include": "#sigils"
+ "comment": "storage modifiers",
+ "name": "storage.modifier.rust",
+ "match": "\\b(abstract|static)\\b"
},
{
- "include": "#self"
+ "comment": "other keywords",
+ "name": "keyword.other.rust",
+ "match": "\\b(as|become|box|dyn|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual)\\b"
},
{
- "include": "#mut"
+ "comment": "fn",
+ "name": "keyword.other.fn.rust",
+ "match": "\\bfn\\b"
},
{
- "include": "#dyn"
+ "comment": "crate",
+ "name": "keyword.other.crate.rust",
+ "match": "\\bcrate\\b"
},
{
- "include": "#impl"
+ "comment": "mut",
+ "name": "storage.modifier.mut.rust",
+ "match": "\\bmut\\b"
},
{
- "include": "#ref_lifetime"
+ "comment": "math operators",
+ "name": "keyword.operator.math.rust",
+ "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))"
},
{
- "include": "#core_types"
+ "comment": "logical operators",
+ "name": "keyword.operator.logical.rust",
+ "match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)"
},
{
- "include": "#core_marker"
+ "comment": "logical AND, borrow references",
+ "name": "keyword.operator.borrow.and.rust",
+ "match": "&(?![&=])"
},
{
- "include": "#core_traits"
+ "comment": "assignment operators",
+ "name": "keyword.operator.assignment.rust",
+ "match": "(-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)"
},
{
- "include": "#std_types"
+ "comment": "single equal",
+ "name": "keyword.operator.assignment.equal.rust",
+ "match": "(?])=(?!=|>)"
},
{
- "include": "#std_traits"
+ "comment": "comparison operators",
+ "name": "keyword.operator.comparison.rust",
+ "match": "(=(=)?(?!>)|!=|<=|(?=)"
},
{
- "include": "#type_params"
+ "comment": "less than, greater than (special case)",
+ "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))",
+ "captures": {
+ "1": {
+ "name": "punctuation.brackets.round.rust"
+ },
+ "2": {
+ "name": "punctuation.brackets.square.rust"
+ },
+ "3": {
+ "name": "punctuation.brackets.curly.rust"
+ },
+ "4": {
+ "name": "keyword.operator.comparison.rust"
+ },
+ "5": {
+ "name": "punctuation.brackets.round.rust"
+ },
+ "6": {
+ "name": "punctuation.brackets.square.rust"
+ },
+ "7": {
+ "name": "punctuation.brackets.curly.rust"
+ }
+ }
},
{
- "include": "#const"
+ "comment": "namespace operator",
+ "name": "keyword.operator.namespace.rust",
+ "match": "::"
},
{
- "include": "#where"
+ "comment": "dereference asterisk",
+ "match": "(\\*)(?=\\w+)",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.dereference.rust"
+ }
+ }
},
{
- "include": "#unsafe"
+ "comment": "subpattern binding",
+ "name": "keyword.operator.subpattern.rust",
+ "match": "@"
},
{
- "comment": "Function arguments",
- "match": "\bfn\b",
- "name": "keyword.other.fn.rust"
- }
- ]
- },
- {
- "comment": "Type declaration",
- "begin": "\\b(enum|struct|trait|union)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
- "end": "[\\{\\(;]",
- "beginCaptures": {
- "1": {
- "name": "storage.type.rust"
+ "comment": "dot access",
+ "name": "keyword.operator.access.dot.rust",
+ "match": "\\.(?!\\.)"
},
- "2": {
- "name": "entity.name.type.rust"
- }
- },
- "patterns": [
{
- "include": "#block_comment"
+ "comment": "ranges, range patterns",
+ "name": "keyword.operator.range.rust",
+ "match": "\\.{2}(=|\\.)?"
},
{
- "include": "#line_comment"
+ "comment": "colon",
+ "name": "keyword.operator.key-value.rust",
+ "match": ":(?!:)"
},
{
- "include": "#core_traits"
+ "comment": "dashrocket, skinny arrow",
+ "name": "keyword.operator.arrow.skinny.rust",
+ "match": "->"
},
{
- "include": "#std_traits"
+ "comment": "hashrocket, fat arrow",
+ "name": "keyword.operator.arrow.fat.rust",
+ "match": "=>"
},
{
- "include": "#type_params"
+ "comment": "dollar macros",
+ "name": "keyword.operator.macro.dollar.rust",
+ "match": "\\$"
},
{
- "include": "#core_types"
- },
- {
- "include": "#pub"
- },
- {
- "include": "#where"
+ "comment": "question mark operator, questionably sized, macro kleene matcher",
+ "name": "keyword.operator.question.rust",
+ "match": "\\?"
}
]
},
- {
- "comment": "Type alias",
- "begin": "\\b(type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
- "end": ";",
- "beginCaptures": {
+ "interpolations": {
+ "comment": "curly brace interpolations",
+ "name": "meta.interpolation.rust",
+ "match": "({)[^\"{}]*(})",
+ "captures": {
"1": {
- "name": "storage.type.rust"
+ "name": "punctuation.definition.interpolation.rust"
},
"2": {
- "name": "entity.name.type.rust"
+ "name": "punctuation.definition.interpolation.rust"
}
- },
+ }
+ },
+ "lifetimes": {
"patterns": [
{
- "include": "#block_comment"
- },
- {
- "include": "#line_comment"
- },
- {
- "include": "#sigils"
- },
- {
- "include": "#mut"
- },
- {
- "include": "#dyn"
- },
- {
- "include": "#impl"
- },
- {
- "include": "#lifetime"
- },
- {
- "include": "#ref_lifetime"
- },
- {
- "include": "#core_types"
- },
- {
- "include": "#core_marker"
- },
- {
- "include": "#core_traits"
- },
- {
- "include": "#std_types"
- },
- {
- "include": "#std_traits"
- },
- {
- "include": "#type_params"
+ "comment": "named lifetime parameters",
+ "match": "(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.lifetime.rust"
+ },
+ "2": {
+ "name": "entity.name.type.lifetime.rust"
+ }
+ }
+ },
+ {
+ "comment": "borrowing references to named lifetimes",
+ "match": "(\\&)(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.borrow.rust"
+ },
+ "2": {
+ "name": "punctuation.definition.lifetime.rust"
+ },
+ "3": {
+ "name": "entity.name.type.lifetime.rust"
+ }
+ }
}
]
- }
- ],
- "repository": {
- "block_doc_comment": {
- "comment": "Block documentation comment",
- "name": "comment.block.documentation.rust",
- "begin": "/\\*[\\*!](?![\\*/])",
- "end": "\\*/",
+ },
+ "macros": {
"patterns": [
{
- "include": "#block_doc_comment"
- },
- {
- "include": "#block_comment"
+ "comment": "macros",
+ "name": "meta.macro.rust",
+ "match": "(([a-z_][A-Za-z0-9_]*!)|([A-Z_][A-Za-z0-9_]*!))",
+ "captures": {
+ "2": {
+ "name": "entity.name.function.macro.rust"
+ },
+ "3": {
+ "name": "entity.name.type.macro.rust"
+ }
+ }
}
]
},
- "block_comment": {
- "comment": "Block comment",
- "name": "comment.block.rust",
- "begin": "/\\*",
- "end": "\\*/",
+ "namespaces": {
"patterns": [
{
- "include": "#block_doc_comment"
- },
- {
- "include": "#block_comment"
+ "comment": "namespace (non-type, non-function path segment)",
+ "match": "(?",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.brackets.angle.rust"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block-comments"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#keywords"
+ },
+ {
+ "include": "#lvariables"
+ },
+ {
+ "include": "#lifetimes"
+ },
+ {
+ "include": "#punctuation"
+ },
+ {
+ "include": "#types"
+ },
+ {
+ "include": "#variables"
+ }
+ ]
+ },
+ {
+ "comment": "primitive types",
+ "name": "entity.name.type.primitive.rust",
+ "match": "\\b(bool|char|str)\\b"
+ },
+ {
+ "comment": "trait declarations",
+ "match": "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.rust"
+ },
+ "2": {
+ "name": "entity.name.type.trait.rust"
+ }
+ }
+ },
+ {
+ "comment": "struct declarations",
+ "match": "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.rust"
+ },
+ "2": {
+ "name": "entity.name.type.struct.rust"
+ }
+ }
+ },
+ {
+ "comment": "enum declarations",
+ "match": "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.rust"
+ },
+ "2": {
+ "name": "entity.name.type.enum.rust"
+ }
+ }
+ },
+ {
+ "comment": "type declarations",
+ "match": "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.rust"
+ },
+ "2": {
+ "name": "entity.name.type.declaration.rust"
+ }
+ }
+ },
+ {
+ "comment": "types",
+ "name": "entity.name.type.rust",
+ "match": "\\b[A-Z][A-Za-z0-9]*\\b(?!!)"
}
]
},
- "raw_string_literal": {
- "comment": "Raw double-quote string literal",
- "name": "string.quoted.double.raw.rust",
- "begin": "b?r(#*)\"",
- "end": "\"\\1"
- },
- "sigils": {
- "comment": "Sigil",
- "name": "keyword.operator.sigil.rust",
- "match": "[&*](?=[a-zA-Z0-9_\\(\\[\\|\\\"]+)"
- },
- "self": {
- "comment": "Self variable",
- "name": "variable.language.rust",
- "match": "\\bself\\b"
- },
- "mut": {
- "comment": "Mutable storage modifier",
- "name": "storage.modifier.mut.rust",
- "match": "\\bmut\\b"
- },
- "dyn": {
- "comment": "Dynamic modifier",
- "name": "storage.modifier.dyn.rust",
- "match": "\\bdyn\\b"
- },
- "impl": {
- "comment": "Existential type modifier",
- "name": "storage.modifier.impl.rust",
- "match": "\\bimpl\\b"
- },
- "box": {
- "comment": "Box storage modifier",
- "name": "storage.modifier.box.rust",
- "match": "\\bbox\\b"
- },
- "const": {
- "comment": "Const storage modifier",
- "name": "storage.modifier.const.rust",
- "match": "\\bconst\\b"
- },
- "pub": {
- "comment": "Visibility modifier",
- "name": "storage.modifier.visibility.rust",
- "match": "\\bpub\\b"
- },
- "unsafe": {
- "comment": "Unsafe code keyword",
- "name": "keyword.other.unsafe.rust",
- "match": "\\bunsafe\\b"
- },
- "where": {
- "comment": "Generic where clause",
- "name": "keyword.other.where.rust",
- "match": "\\bwhere\\b"
- },
- "lifetime": {
- "comment": "Named lifetime",
- "name": "storage.modifier.lifetime.rust",
- "match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b",
- "captures": {
- "1": {
- "name": "entity.name.lifetime.rust"
- }
- }
- },
- "ref_lifetime": {
- "comment": "Reference with named lifetime",
- "match": "&('([a-zA-Z_][a-zA-Z0-9_]*))\\b",
- "captures": {
- "1": {
- "name": "storage.modifier.lifetime.rust"
- },
- "2": {
- "name": "entity.name.lifetime.rust"
- }
- }
- },
- "core_types": {
- "comment": "Built-in/core type",
- "name": "storage.type.core.rust",
- "match": "\\b(bool|char|usize|isize|u8|u16|u32|u64|u128|i8|i16|i32|i64|i128|f32|f64|str|Self|Option|Result)\\b"
- },
- "core_vars": {
- "comment": "Core type variant",
- "name": "support.constant.core.rust",
- "match": "\\b(Some|None|Ok|Err)\\b"
- },
- "core_marker": {
- "comment": "Core trait (marker)",
- "name": "support.type.marker.rust",
- "match": "\\b(Copy|Send|Sized|Sync)\\b"
- },
- "core_traits": {
- "comment": "Core trait",
- "name": "support.type.core.rust",
- "match": "\\b(Drop|Fn|FnMut|FnOnce|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator)\\b"
- },
- "std_types": {
- "comment": "Standard library type",
- "name": "storage.class.std.rust",
- "match": "\\b(Box|String|Vec|Path|PathBuf)\\b"
- },
- "std_traits": {
- "comment": "Standard library trait",
- "name": "support.type.std.rust",
- "match": "\\b(ToOwned|ToString)\\b"
- },
- "type": {
- "comment": "A type",
- "name": "entity.name.type.rust",
- "match": "\\b([A-Za-z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b"
- },
- "type_params": {
- "comment": "Type parameters",
- "name": "meta.type_params.rust",
- "begin": "<(?![=<])",
- "end": "(?",
+ "gtypes": {
"patterns": [
{
- "include": "#block_comment"
+ "comment": "option types",
+ "name": "entity.name.type.option.rust",
+ "match": "\\b(Some|None)\\b"
},
{
- "include": "#line_comment"
- },
- {
- "include": "#sigils"
- },
+ "comment": "result types",
+ "name": "entity.name.type.result.rust",
+ "match": "\\b(Ok|Err)\\b"
+ }
+ ]
+ },
+ "punctuation": {
+ "patterns": [
{
- "include": "#mut"
+ "comment": "comma",
+ "name": "punctuation.comma.rust",
+ "match": ","
},
{
- "include": "#dyn"
+ "comment": "curly braces",
+ "name": "punctuation.brackets.curly.rust",
+ "match": "[{}]"
},
{
- "include": "#impl"
+ "comment": "parentheses, round brackets",
+ "name": "punctuation.brackets.round.rust",
+ "match": "[()]"
},
{
- "include": "#lifetime"
+ "comment": "semicolon",
+ "name": "punctuation.semi.rust",
+ "match": ";"
},
{
- "include": "#core_types"
+ "comment": "square brackets",
+ "name": "punctuation.brackets.square.rust",
+ "match": "[\\[\\]]"
},
{
- "include": "#core_marker"
- },
+ "comment": "angle brackets",
+ "name": "punctuation.brackets.angle.rust",
+ "match": "(?]"
+ }
+ ]
+ },
+ "strings": {
+ "patterns": [
{
- "include": "#core_traits"
- },
+ "comment": "double-quoted strings and byte strings",
+ "name": "string.quoted.double.rust",
+ "begin": "(b?)(\")",
+ "beginCaptures": {
+ "1": {
+ "name": "string.quoted.byte.raw.rust"
+ },
+ "2": {
+ "name": "punctuation.definition.string.rust"
+ }
+ },
+ "end": "\"",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.rust"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#escapes"
+ },
+ {
+ "include": "#interpolations"
+ }
+ ]
+ },
+ {
+ "comment": "double-quoted raw strings and raw byte strings",
+ "name": "string.quoted.double.rust",
+ "begin": "(b?r)(#*)(\")",
+ "beginCaptures": {
+ "1": {
+ "name": "string.quoted.byte.raw.rust"
+ },
+ "2": {
+ "name": "punctuation.definition.string.raw.rust"
+ },
+ "3": {
+ "name": "punctuation.definition.string.rust"
+ }
+ },
+ "end": "(\")(\\2)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.rust"
+ },
+ "2": {
+ "name": "punctuation.definition.string.raw.rust"
+ }
+ }
+ },
+ {
+ "comment": "characters and bytes",
+ "name": "string.quoted.single.char.rust",
+ "begin": "(b)?(')",
+ "beginCaptures": {
+ "1": {
+ "name": "string.quoted.byte.raw.rust"
+ },
+ "2": {
+ "name": "punctuation.definition.char.rust"
+ }
+ },
+ "end": "'",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.char.rust"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#escapes"
+ }
+ ]
+ }
+ ]
+ },
+ "lvariables": {
+ "patterns": [
{
- "include": "#std_types"
+ "comment": "self",
+ "name": "variable.language.self.rust",
+ "match": "\\b[Ss]elf\\b"
},
{
- "include": "#std_traits"
- },
+ "comment": "super",
+ "name": "variable.language.super.rust",
+ "match": "\\bsuper\\b"
+ }
+ ]
+ },
+ "variables": {
+ "patterns": [
{
- "include": "#type_params"
+ "comment": "variables",
+ "name": "variable.other.rust",
+ "match": "\\b(?",
- "t": "source.rust meta.type_params.rust",
+ "c": "<",
+ "t": "source.rust punctuation.brackets.angle.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -44,30 +44,19 @@
}
},
{
- "c": " ",
- "t": "source.rust",
+ "c": "A",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "where",
- "t": "source.rust keyword.other.where.rust",
- "r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
- "c": " ",
- "t": "source.rust",
+ "c": ",",
+ "t": "source.rust punctuation.comma.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -77,7 +66,7 @@
}
},
{
- "c": "A",
+ "c": "B",
"t": "source.rust entity.name.type.rust",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
@@ -88,8 +77,8 @@
}
},
{
- "c": ": ",
- "t": "source.rust",
+ "c": ">",
+ "t": "source.rust punctuation.brackets.angle.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -99,18 +88,7 @@
}
},
{
- "c": "B",
- "t": "source.rust entity.name.type.rust",
- "r": {
- "dark_plus": "entity.name.type: #4EC9B0",
- "light_plus": "entity.name.type: #267F99",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "entity.name.type: #4EC9B0"
- }
- },
- {
- "c": "{ }",
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -121,14 +99,14 @@
}
},
{
- "c": "impl",
- "t": "source.rust storage.type.rust",
+ "c": "where",
+ "t": "source.rust keyword.control.rust",
"r": {
- "dark_plus": "storage.type: #569CD6",
- "light_plus": "storage.type: #0000FF",
- "dark_vs": "storage.type: #569CD6",
- "light_vs": "storage.type: #0000FF",
- "hc_black": "storage.type: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
}
},
{
@@ -143,7 +121,7 @@
}
},
{
- "c": "Foo",
+ "c": "A",
"t": "source.rust entity.name.type.rust",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
@@ -154,14 +132,14 @@
}
},
{
- "c": "",
- "t": "source.rust meta.type_params.rust",
+ "c": ":",
+ "t": "source.rust keyword.operator.key-value.rust",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
}
},
{
@@ -176,19 +154,19 @@
}
},
{
- "c": "for",
- "t": "source.rust storage.type.rust",
+ "c": "B",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "storage.type: #569CD6",
- "light_plus": "storage.type: #0000FF",
- "dark_vs": "storage.type: #569CD6",
- "light_vs": "storage.type: #0000FF",
- "hc_black": "storage.type: #569CD6"
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
- "c": " ",
- "t": "source.rust",
+ "c": "{",
+ "t": "source.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -198,19 +176,19 @@
}
},
{
- "c": "C",
- "t": "source.rust entity.name.type.rust",
+ "c": " ",
+ "t": "source.rust",
"r": {
- "dark_plus": "entity.name.type: #4EC9B0",
- "light_plus": "entity.name.type: #267F99",
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "entity.name.type: #4EC9B0"
+ "hc_black": "default: #FFFFFF"
}
},
{
- "c": " ",
- "t": "source.rust",
+ "c": "}",
+ "t": "source.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -220,8 +198,8 @@
}
},
{
- "c": "where",
- "t": "source.rust keyword.other.where.rust",
+ "c": "impl",
+ "t": "source.rust keyword.other.rust",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -242,7 +220,7 @@
}
},
{
- "c": "A",
+ "c": "Foo",
"t": "source.rust entity.name.type.rust",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
@@ -253,8 +231,8 @@
}
},
{
- "c": ": ",
- "t": "source.rust",
+ "c": "<",
+ "t": "source.rust punctuation.brackets.angle.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -264,7 +242,7 @@
}
},
{
- "c": "B",
+ "c": "A",
"t": "source.rust entity.name.type.rust",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
@@ -275,30 +253,8 @@
}
},
{
- "c": "{ }",
- "t": "source.rust",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "impl",
- "t": "source.rust storage.type.rust",
- "r": {
- "dark_plus": "storage.type: #569CD6",
- "light_plus": "storage.type: #0000FF",
- "dark_vs": "storage.type: #569CD6",
- "light_vs": "storage.type: #0000FF",
- "hc_black": "storage.type: #569CD6"
- }
- },
- {
- "c": " ",
- "t": "source.rust",
+ "c": ",",
+ "t": "source.rust punctuation.comma.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -308,7 +264,7 @@
}
},
{
- "c": "Foo",
+ "c": "B",
"t": "source.rust entity.name.type.rust",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
@@ -319,8 +275,8 @@
}
},
{
- "c": "",
- "t": "source.rust meta.type_params.rust",
+ "c": ">",
+ "t": "source.rust punctuation.brackets.angle.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -342,13 +298,13 @@
},
{
"c": "for",
- "t": "source.rust storage.type.rust",
+ "t": "source.rust keyword.control.rust",
"r": {
- "dark_plus": "storage.type: #569CD6",
- "light_plus": "storage.type: #0000FF",
- "dark_vs": "storage.type: #569CD6",
- "light_vs": "storage.type: #0000FF",
- "hc_black": "storage.type: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
}
},
{
@@ -373,17 +329,6 @@
"hc_black": "entity.name.type: #4EC9B0"
}
},
- {
- "c": "{",
- "t": "source.rust",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
{
"c": " ",
"t": "source.rust",
@@ -396,14 +341,14 @@
}
},
{
- "c": "fn",
- "t": "source.rust keyword.other.fn.rust",
+ "c": "where",
+ "t": "source.rust keyword.control.rust",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
}
},
{
@@ -418,29 +363,29 @@
}
},
{
- "c": "foo",
- "t": "source.rust entity.name.function.rust",
+ "c": "A",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "entity.name.function: #DCDCAA",
- "light_plus": "entity.name.function: #795E26",
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "entity.name.function: #DCDCAA"
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
- "c": "",
- "t": "source.rust meta.type_params.rust",
+ "c": ":",
+ "t": "source.rust keyword.operator.key-value.rust",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
}
},
{
- "c": " -> C",
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -451,30 +396,19 @@
}
},
{
- "c": " ",
- "t": "source.rust",
+ "c": "B",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "where",
- "t": "source.rust keyword.other.where.rust",
- "r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
- "c": " A: B",
- "t": "source.rust",
+ "c": "{",
+ "t": "source.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -484,7 +418,7 @@
}
},
{
- "c": " { }",
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -496,7 +430,7 @@
},
{
"c": "}",
- "t": "source.rust",
+ "t": "source.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -506,8 +440,8 @@
}
},
{
- "c": "fn",
- "t": "source.rust keyword.other.fn.rust",
+ "c": "impl",
+ "t": "source.rust keyword.other.rust",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -528,19 +462,19 @@
}
},
{
- "c": "foo",
- "t": "source.rust entity.name.function.rust",
+ "c": "Foo",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "entity.name.function: #DCDCAA",
- "light_plus": "entity.name.function: #795E26",
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "entity.name.function: #DCDCAA"
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
- "c": "",
- "t": "source.rust meta.type_params.rust",
+ "c": "<",
+ "t": "source.rust punctuation.brackets.angle.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -550,19 +484,19 @@
}
},
{
- "c": " -> C",
- "t": "source.rust",
+ "c": "A",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
- "c": " ",
- "t": "source.rust",
+ "c": ",",
+ "t": "source.rust punctuation.comma.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -572,19 +506,19 @@
}
},
{
- "c": "where",
- "t": "source.rust keyword.other.where.rust",
+ "c": "B",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
- "c": " A: B",
- "t": "source.rust",
+ "c": ">",
+ "t": "source.rust punctuation.brackets.angle.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -594,7 +528,7 @@
}
},
{
- "c": "{ }",
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -605,14 +539,14 @@
}
},
{
- "c": "struct",
- "t": "source.rust storage.type.rust",
+ "c": "for",
+ "t": "source.rust keyword.control.rust",
"r": {
- "dark_plus": "storage.type: #569CD6",
- "light_plus": "storage.type: #0000FF",
- "dark_vs": "storage.type: #569CD6",
- "light_vs": "storage.type: #0000FF",
- "hc_black": "storage.type: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
}
},
{
@@ -627,7 +561,7 @@
}
},
{
- "c": "Foo",
+ "c": "C",
"t": "source.rust entity.name.type.rust",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
@@ -638,8 +572,8 @@
}
},
{
- "c": "",
- "t": "source.rust meta.type_params.rust",
+ "c": "{",
+ "t": "source.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -660,19 +594,19 @@
}
},
{
- "c": "where",
- "t": "source.rust keyword.other.where.rust",
+ "c": "fn",
+ "t": "source.rust meta.function.definition.rust keyword.control.fn.rust",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
}
},
{
- "c": " A: B",
- "t": "source.rust",
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -682,8 +616,679 @@
}
},
{
- "c": "{ }",
- "t": "source.rust",
+ "c": "foo",
+ "t": "source.rust meta.function.definition.rust entity.name.function.rust",
+ "r": {
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.function: #DCDCAA"
+ }
+ },
+ {
+ "c": "<",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "A",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ",",
+ "t": "source.rust meta.function.definition.rust punctuation.comma.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "B",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ">",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "->",
+ "t": "source.rust meta.function.definition.rust keyword.operator.arrow.skinny.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "C",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "where",
+ "t": "source.rust meta.function.definition.rust keyword.control.rust",
+ "r": {
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "A",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ":",
+ "t": "source.rust meta.function.definition.rust keyword.operator.key-value.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "B",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "{",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "}",
+ "t": "source.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "}",
+ "t": "source.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "fn",
+ "t": "source.rust meta.function.definition.rust keyword.control.fn.rust",
+ "r": {
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "foo",
+ "t": "source.rust meta.function.definition.rust entity.name.function.rust",
+ "r": {
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.function: #DCDCAA"
+ }
+ },
+ {
+ "c": "<",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "A",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ",",
+ "t": "source.rust meta.function.definition.rust punctuation.comma.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "B",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ">",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "->",
+ "t": "source.rust meta.function.definition.rust keyword.operator.arrow.skinny.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "C",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "where",
+ "t": "source.rust meta.function.definition.rust keyword.control.rust",
+ "r": {
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "A",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ":",
+ "t": "source.rust meta.function.definition.rust keyword.operator.key-value.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "B",
+ "t": "source.rust meta.function.definition.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": "{",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "}",
+ "t": "source.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "struct",
+ "t": "source.rust storage.type.rust",
+ "r": {
+ "dark_plus": "storage.type: #569CD6",
+ "light_plus": "storage.type: #0000FF",
+ "dark_vs": "storage.type: #569CD6",
+ "light_vs": "storage.type: #0000FF",
+ "hc_black": "storage.type: #569CD6"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "Foo",
+ "t": "source.rust entity.name.type.struct.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": "<",
+ "t": "source.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "A",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ",",
+ "t": "source.rust punctuation.comma.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "B",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ">",
+ "t": "source.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "where",
+ "t": "source.rust keyword.control.rust",
+ "r": {
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "A",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ":",
+ "t": "source.rust keyword.operator.key-value.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "B",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": "{",
+ "t": "source.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "}",
+ "t": "source.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -716,6 +1321,50 @@
},
{
"c": "Foo",
+ "t": "source.rust entity.name.type.trait.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": "<",
+ "t": "source.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "A",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ",",
+ "t": "source.rust punctuation.comma.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "B",
"t": "source.rust entity.name.type.rust",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
@@ -726,8 +1375,19 @@
}
},
{
- "c": "",
- "t": "source.rust meta.type_params.rust",
+ "c": ">",
+ "t": "source.rust punctuation.brackets.angle.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -737,7 +1397,18 @@
}
},
{
- "c": " : C",
+ "c": ":",
+ "t": "source.rust keyword.operator.key-value.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -747,6 +1418,17 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "C",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
{
"c": " ",
"t": "source.rust",
@@ -760,17 +1442,50 @@
},
{
"c": "where",
- "t": "source.rust keyword.other.where.rust",
+ "t": "source.rust keyword.control.rust",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
}
},
{
- "c": " A: B",
+ "c": "A",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": ":",
+ "t": "source.rust keyword.operator.key-value.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -781,7 +1496,29 @@
}
},
{
- "c": "{ }",
+ "c": "B",
+ "t": "source.rust entity.name.type.rust",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": "{",
+ "t": "source.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -790,5 +1527,16 @@
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
+ },
+ {
+ "c": "}",
+ "t": "source.rust punctuation.brackets.curly.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
}
]
\ No newline at end of file
diff --git a/extensions/rust/test/colorize-results/test_rs.json b/extensions/rust/test/colorize-results/test_rs.json
index 977fe6bd28c2cba887c85f3e4f09d98ff47f0ec8..82615d435e249295098a3c303a320faf215645ae 100644
--- a/extensions/rust/test/colorize-results/test_rs.json
+++ b/extensions/rust/test/colorize-results/test_rs.json
@@ -1,18 +1,18 @@
[
{
"c": "use",
- "t": "source.rust keyword.other.rust",
+ "t": "source.rust meta.use.rust keyword.control.rust",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
}
},
{
- "c": " std",
- "t": "source.rust",
+ "c": " ",
+ "t": "source.rust meta.use.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -21,9 +21,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "std",
+ "t": "source.rust meta.use.rust entity.name.namespace.rust",
+ "r": {
+ "dark_plus": "entity.name.namespace: #4EC9B0",
+ "light_plus": "entity.name.namespace: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.namespace: #4EC9B0"
+ }
+ },
{
"c": "::",
- "t": "source.rust keyword.operator.misc.rust",
+ "t": "source.rust meta.use.rust keyword.operator.namespace.rust",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -33,8 +44,19 @@
}
},
{
- "c": "io;",
- "t": "source.rust",
+ "c": "io",
+ "t": "source.rust meta.use.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.rust meta.use.rust punctuation.semi.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -45,18 +67,18 @@
},
{
"c": "fn",
- "t": "source.rust keyword.other.fn.rust",
+ "t": "source.rust meta.function.definition.rust keyword.control.fn.rust",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "dark_plus": "keyword.control: #C586C0",
+ "light_plus": "keyword.control: #AF00DB",
+ "dark_vs": "keyword.control: #569CD6",
+ "light_vs": "keyword.control: #0000FF",
+ "hc_black": "keyword.control: #C586C0"
}
},
{
"c": " ",
- "t": "source.rust",
+ "t": "source.rust meta.function.definition.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -67,7 +89,7 @@
},
{
"c": "main",
- "t": "source.rust entity.name.function.rust",
+ "t": "source.rust meta.function.definition.rust entity.name.function.rust",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -77,8 +99,30 @@
}
},
{
- "c": "() {",
- "t": "source.rust",
+ "c": "()",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.round.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.rust meta.function.definition.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "{",
+ "t": "source.rust meta.function.definition.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -100,18 +144,18 @@
},
{
"c": "println!",
- "t": "source.rust support.function.std.rust",
+ "t": "source.rust meta.macro.rust entity.name.function.macro.rust",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.rust",
+ "t": "source.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -121,7 +165,18 @@
}
},
{
- "c": "\"Guess the number!\"",
+ "c": "\"",
+ "t": "source.rust string.quoted.double.rust punctuation.definition.string.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "Guess the number!",
"t": "source.rust string.quoted.double.rust",
"r": {
"dark_plus": "string: #CE9178",
@@ -132,8 +187,30 @@
}
},
{
- "c": ");",
- "t": "source.rust",
+ "c": "\"",
+ "t": "source.rust string.quoted.double.rust punctuation.definition.string.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.rust punctuation.brackets.round.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.rust punctuation.semi.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -155,18 +232,18 @@
},
{
"c": "println!",
- "t": "source.rust support.function.std.rust",
+ "t": "source.rust meta.macro.rust entity.name.function.macro.rust",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.rust",
+ "t": "source.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -176,7 +253,18 @@
}
},
{
- "c": "\"Please input your guess.\"",
+ "c": "\"",
+ "t": "source.rust string.quoted.double.rust punctuation.definition.string.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "Please input your guess.",
"t": "source.rust string.quoted.double.rust",
"r": {
"dark_plus": "string: #CE9178",
@@ -187,8 +275,30 @@
}
},
{
- "c": ");",
- "t": "source.rust",
+ "c": "\"",
+ "t": "source.rust string.quoted.double.rust punctuation.definition.string.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.rust punctuation.brackets.round.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.rust punctuation.semi.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -210,13 +320,13 @@
},
{
"c": "let",
- "t": "source.rust keyword.other.rust",
+ "t": "source.rust storage.type.rust",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "dark_plus": "storage.type: #569CD6",
+ "light_plus": "storage.type: #0000FF",
+ "dark_vs": "storage.type: #569CD6",
+ "light_vs": "storage.type: #0000FF",
+ "hc_black": "storage.type: #569CD6"
}
},
{
@@ -242,7 +352,29 @@
}
},
{
- "c": " guess ",
+ "c": " ",
+ "t": "source.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "guess",
+ "t": "source.rust variable.other.rust",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
+ {
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -254,7 +386,7 @@
},
{
"c": "=",
- "t": "source.rust keyword.operator.assignment.rust",
+ "t": "source.rust keyword.operator.assignment.equal.rust",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -276,18 +408,18 @@
},
{
"c": "String",
- "t": "source.rust storage.class.std.rust",
+ "t": "source.rust entity.name.type.rust",
"r": {
- "dark_plus": "storage: #569CD6",
- "light_plus": "storage: #0000FF",
- "dark_vs": "storage: #569CD6",
- "light_vs": "storage: #0000FF",
- "hc_black": "storage: #569CD6"
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
}
},
{
"c": "::",
- "t": "source.rust keyword.operator.misc.rust",
+ "t": "source.rust keyword.operator.namespace.rust",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -298,7 +430,7 @@
},
{
"c": "new",
- "t": "source.rust entity.name.function.rust",
+ "t": "source.rust meta.function.call.rust entity.name.function.rust",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -308,8 +440,8 @@
}
},
{
- "c": "();",
- "t": "source.rust",
+ "c": "()",
+ "t": "source.rust meta.function.call.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -319,7 +451,18 @@
}
},
{
- "c": " io",
+ "c": ";",
+ "t": "source.rust punctuation.semi.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -329,9 +472,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "io",
+ "t": "source.rust entity.name.namespace.rust",
+ "r": {
+ "dark_plus": "entity.name.namespace: #4EC9B0",
+ "light_plus": "entity.name.namespace: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.namespace: #4EC9B0"
+ }
+ },
{
"c": "::",
- "t": "source.rust keyword.operator.misc.rust",
+ "t": "source.rust keyword.operator.namespace.rust",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -342,7 +496,7 @@
},
{
"c": "stdin",
- "t": "source.rust entity.name.function.rust",
+ "t": "source.rust meta.function.call.rust entity.name.function.rust",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -352,8 +506,8 @@
}
},
{
- "c": "().",
- "t": "source.rust",
+ "c": "()",
+ "t": "source.rust meta.function.call.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -362,9 +516,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": ".",
+ "t": "source.rust keyword.operator.access.dot.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
{
"c": "read_line",
- "t": "source.rust entity.name.function.rust",
+ "t": "source.rust meta.function.call.rust entity.name.function.rust",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -375,7 +540,7 @@
},
{
"c": "(",
- "t": "source.rust",
+ "t": "source.rust meta.function.call.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -386,7 +551,7 @@
},
{
"c": "&",
- "t": "source.rust keyword.operator.sigil.rust",
+ "t": "source.rust meta.function.call.rust keyword.operator.borrow.and.rust",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -397,7 +562,7 @@
},
{
"c": "mut",
- "t": "source.rust storage.modifier.mut.rust",
+ "t": "source.rust meta.function.call.rust storage.modifier.mut.rust",
"r": {
"dark_plus": "storage.modifier: #569CD6",
"light_plus": "storage.modifier: #0000FF",
@@ -407,8 +572,30 @@
}
},
{
- "c": " guess)",
- "t": "source.rust",
+ "c": " ",
+ "t": "source.rust meta.function.call.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "guess",
+ "t": "source.rust meta.function.call.rust variable.other.rust",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.rust meta.function.call.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -418,7 +605,7 @@
}
},
{
- "c": " .",
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -428,9 +615,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": ".",
+ "t": "source.rust keyword.operator.access.dot.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
{
"c": "ok",
- "t": "source.rust entity.name.function.rust",
+ "t": "source.rust meta.function.call.rust entity.name.function.rust",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -441,7 +639,7 @@
},
{
"c": "()",
- "t": "source.rust",
+ "t": "source.rust meta.function.call.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -451,7 +649,7 @@
}
},
{
- "c": " .",
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -461,9 +659,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": ".",
+ "t": "source.rust keyword.operator.access.dot.rust",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
{
"c": "expect",
- "t": "source.rust entity.name.function.rust",
+ "t": "source.rust meta.function.call.rust entity.name.function.rust",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -474,7 +683,7 @@
},
{
"c": "(",
- "t": "source.rust",
+ "t": "source.rust meta.function.call.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -484,8 +693,8 @@
}
},
{
- "c": "\"Failed to read line\"",
- "t": "source.rust string.quoted.double.rust",
+ "c": "\"",
+ "t": "source.rust meta.function.call.rust string.quoted.double.rust punctuation.definition.string.rust",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -495,8 +704,41 @@
}
},
{
- "c": ");",
- "t": "source.rust",
+ "c": "Failed to read line",
+ "t": "source.rust meta.function.call.rust string.quoted.double.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "source.rust meta.function.call.rust string.quoted.double.rust punctuation.definition.string.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.rust meta.function.call.rust punctuation.brackets.round.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.rust punctuation.semi.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -518,18 +760,18 @@
},
{
"c": "println!",
- "t": "source.rust support.function.std.rust",
+ "t": "source.rust meta.macro.rust entity.name.function.macro.rust",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.rust",
+ "t": "source.rust punctuation.brackets.round.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -539,7 +781,18 @@
}
},
{
- "c": "\"You guessed: {}\"",
+ "c": "\"",
+ "t": "source.rust string.quoted.double.rust punctuation.definition.string.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "You guessed: ",
"t": "source.rust string.quoted.double.rust",
"r": {
"dark_plus": "string: #CE9178",
@@ -550,7 +803,40 @@
}
},
{
- "c": ", guess);",
+ "c": "{}",
+ "t": "source.rust string.quoted.double.rust meta.interpolation.rust punctuation.definition.interpolation.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "source.rust string.quoted.double.rust punctuation.definition.string.rust",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": ",",
+ "t": "source.rust punctuation.comma.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
"t": "source.rust",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -560,9 +846,42 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "guess",
+ "t": "source.rust variable.other.rust",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.rust punctuation.brackets.round.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.rust punctuation.semi.rust",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
{
"c": "}",
- "t": "source.rust",
+ "t": "source.rust punctuation.brackets.curly.rust",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
diff --git a/scripts/code.bat b/scripts/code.bat
index 7ef1fd33fe000ae5b2a0f0e775c0e7aebba36a38..a05bea92d57354519fc5fc90a6ec23756d10e757 100644
--- a/scripts/code.bat
+++ b/scripts/code.bat
@@ -22,7 +22,6 @@ set VSCODE_DEV=1
set VSCODE_CLI=1
set ELECTRON_ENABLE_LOGGING=1
set ELECTRON_ENABLE_STACK_DUMPING=1
-set VSCODE_LOGS=
:: Launch Code
diff --git a/scripts/code.sh b/scripts/code.sh
index 7ab367c178c22796195e3a5487622f98635c2756..3095f3897bf7f397449ad3fc3047f8aeb4a997e1 100755
--- a/scripts/code.sh
+++ b/scripts/code.sh
@@ -41,7 +41,6 @@ function code() {
export VSCODE_CLI=1
export ELECTRON_ENABLE_STACK_DUMPING=1
export ELECTRON_ENABLE_LOGGING=1
- export VSCODE_LOGS=
# Launch Code
exec "$CODE" . --no-sandbox "$@"
diff --git a/src/vs/base/browser/ui/tree/abstractTree.ts b/src/vs/base/browser/ui/tree/abstractTree.ts
index fa8ac3e84a2ce93134651e56ab251e39d0d6f3ed..8eb81d59f07f3f1645b17fe708b9c4818cd965c4 100644
--- a/src/vs/base/browser/ui/tree/abstractTree.ts
+++ b/src/vs/base/browser/ui/tree/abstractTree.ts
@@ -811,7 +811,7 @@ class TypeFilterController implements IDisposable {
const onDragOver = (event: DragEvent) => {
event.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
- const x = event.screenX - left;
+ const x = event.clientX - left;
if (event.dataTransfer) {
event.dataTransfer.dropEffect = 'none';
}
@@ -954,6 +954,7 @@ export interface IAbstractTreeOptionsUpdate extends ITreeRendererOptions {
readonly smoothScrolling?: boolean;
readonly horizontalScrolling?: boolean;
readonly expandOnlyOnDoubleClick?: boolean;
+ readonly expandOnlyOnTwistieClick?: boolean | ((e: any) => boolean); // e is T
}
export interface IAbstractTreeOptions extends IAbstractTreeOptionsUpdate, IListOptions {
@@ -961,7 +962,6 @@ export interface IAbstractTreeOptions extends IAbstractTr
readonly filter?: ITreeFilter;
readonly dnd?: ITreeDragAndDrop;
readonly keyboardNavigationEventFilter?: IKeyboardNavigationEventFilter;
- readonly expandOnlyOnTwistieClick?: boolean | ((e: T) => boolean);
readonly additionalScrollHeight?: number;
}
@@ -1109,7 +1109,9 @@ class TreeNodeListMouseController extends MouseController<
expandOnlyOnTwistieClick = !!this.tree.expandOnlyOnTwistieClick;
}
- if (expandOnlyOnTwistieClick && !onTwistie) {
+ const clickedOnFocus = this.tree.getFocus()[0] === node.element;
+
+ if (expandOnlyOnTwistieClick && !onTwistie && e.browserEvent.detail !== 2 && !(clickedOnFocus && !node.collapsed)) {
return super.onViewPointer(e);
}
diff --git a/src/vs/base/test/common/processes.test.ts b/src/vs/base/test/common/processes.test.ts
index 4b49a381179385ce97785dd6477b450ab073bf25..ee0d25c88dfa1bf2fecba1f01ff868b9d2151e0b 100644
--- a/src/vs/base/test/common/processes.test.ts
+++ b/src/vs/base/test/common/processes.test.ts
@@ -19,7 +19,6 @@ suite('Processes', () => {
VSCODE_CLI: 'x',
VSCODE_DEV: 'x',
VSCODE_IPC_HOOK: 'x',
- VSCODE_LOGS: 'x',
VSCODE_NLS_CONFIG: 'x',
VSCODE_PORTABLE: 'x',
VSCODE_PID: 'x',
diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts
index 10f4a19f1de8f117e4e788e5fb5329762ae79420..1b6ce0e68022fb99a36d322d8e610c7d5b71b3a4 100644
--- a/src/vs/code/electron-main/main.ts
+++ b/src/vs/code/electron-main/main.ts
@@ -200,7 +200,7 @@ class CodeMain {
VSCODE_IPC_HOOK: environmentService.mainIPCHandle
};
- ['VSCODE_NLS_CONFIG', 'VSCODE_LOGS', 'VSCODE_PORTABLE'].forEach(key => {
+ ['VSCODE_NLS_CONFIG', 'VSCODE_PORTABLE'].forEach(key => {
const value = process.env[key];
if (typeof value === 'string') {
instanceEnvironment[key] = value;
diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts
index 8f3e6e4fec2502454a1522af083d5c7e7126bc51..c2c0141e294f1753af00ef386276033ce884e453 100644
--- a/src/vs/editor/common/config/editorOptions.ts
+++ b/src/vs/editor/common/config/editorOptions.ts
@@ -370,6 +370,10 @@ export interface IEditorOptions {
* Suggest options.
*/
suggest?: ISuggestOptions;
+ /**
+ * Smart select opptions;
+ */
+ smartSelect?: ISmartSelectOptions;
/**
*
*/
@@ -3430,6 +3434,44 @@ class EditorSuggest extends BaseEditorOption>;
+
+class SmartSelect extends BaseEditorOption {
+
+ constructor() {
+ super(
+ EditorOption.smartSelect, 'smartSelect',
+ {
+ selectLeadingAndTrailingWhitespace: true
+ },
+ {
+ 'editor.smartSelect.selectLeadingAndTrailingWhitespace': {
+ description: nls.localize('selectLeadingAndTrailingWhitespace', "Whether leading and trailing whitespace should always be selected."),
+ default: true,
+ type: 'boolean'
+ }
+ }
+ );
+ }
+
+ public validate(input: any): Readonly> {
+ if (!input || typeof input !== 'object') {
+ return this.defaultValue;
+ }
+ return {
+ selectLeadingAndTrailingWhitespace: EditorBooleanOption.boolean((input as ISmartSelectOptions).selectLeadingAndTrailingWhitespace, this.defaultValue.selectLeadingAndTrailingWhitespace)
+ };
+ }
+}
+
+//#endregion
+
//#region tabFocusMode
class EditorTabFocusMode extends ComputedEditorOption {
@@ -3646,6 +3688,7 @@ export const enum EditorOption {
showFoldingControls,
showUnused,
snippetSuggestions,
+ smartSelect,
smoothScrolling,
stopRenderingLineAfter,
suggest,
@@ -4165,6 +4208,7 @@ export const EditorOptions = {
description: nls.localize('snippetSuggestions', "Controls whether snippets are shown with other suggestions and how they are sorted.")
}
)),
+ smartSelect: register(new SmartSelect()),
smoothScrolling: register(new EditorBooleanOption(
EditorOption.smoothScrolling, 'smoothScrolling', false,
{ description: nls.localize('smoothScrolling', "Controls whether the editor will scroll using an animation.") }
diff --git a/src/vs/editor/common/modes.ts b/src/vs/editor/common/modes.ts
index 0ab1352cfb0d755dc0465cfcee8652b244c95899..4cdbc83339ecab087c36168be67a6cc9c73117e2 100644
--- a/src/vs/editor/common/modes.ts
+++ b/src/vs/editor/common/modes.ts
@@ -19,7 +19,7 @@ import { TokenizationRegistryImpl } from 'vs/editor/common/modes/tokenizationReg
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
import { IMarkerData } from 'vs/platform/markers/common/markers';
import { iconRegistry, Codicon } from 'vs/base/common/codicons';
-
+import { ThemeIcon } from 'vs/platform/theme/common/themeService';
/**
* Open ended enum at runtime
* @internal
@@ -1359,7 +1359,10 @@ export interface WorkspaceEditMetadata {
needsConfirmation: boolean;
label: string;
description?: string;
- iconPath?: { id: string } | URI | { light: URI, dark: URI };
+ /**
+ * @internal
+ */
+ iconPath?: ThemeIcon | URI | { light: URI, dark: URI };
}
export interface WorkspaceFileEditOptions {
diff --git a/src/vs/editor/common/standalone/standaloneEnums.ts b/src/vs/editor/common/standalone/standaloneEnums.ts
index 01bf8eabf2602628802fa1615b10ae39bc747eef..91c07a481a702cb8e4725485841cee8d5049aa0d 100644
--- a/src/vs/editor/common/standalone/standaloneEnums.ts
+++ b/src/vs/editor/common/standalone/standaloneEnums.ts
@@ -261,31 +261,32 @@ export enum EditorOption {
showFoldingControls = 91,
showUnused = 92,
snippetSuggestions = 93,
- smoothScrolling = 94,
- stopRenderingLineAfter = 95,
- suggest = 96,
- suggestFontSize = 97,
- suggestLineHeight = 98,
- suggestOnTriggerCharacters = 99,
- suggestSelection = 100,
- tabCompletion = 101,
- tabIndex = 102,
- unusualLineTerminators = 103,
- useTabStops = 104,
- wordSeparators = 105,
- wordWrap = 106,
- wordWrapBreakAfterCharacters = 107,
- wordWrapBreakBeforeCharacters = 108,
- wordWrapColumn = 109,
- wordWrapMinified = 110,
- wrappingIndent = 111,
- wrappingStrategy = 112,
- showDeprecated = 113,
- editorClassName = 114,
- pixelRatio = 115,
- tabFocusMode = 116,
- layoutInfo = 117,
- wrappingInfo = 118
+ smartSelect = 94,
+ smoothScrolling = 95,
+ stopRenderingLineAfter = 96,
+ suggest = 97,
+ suggestFontSize = 98,
+ suggestLineHeight = 99,
+ suggestOnTriggerCharacters = 100,
+ suggestSelection = 101,
+ tabCompletion = 102,
+ tabIndex = 103,
+ unusualLineTerminators = 104,
+ useTabStops = 105,
+ wordSeparators = 106,
+ wordWrap = 107,
+ wordWrapBreakAfterCharacters = 108,
+ wordWrapBreakBeforeCharacters = 109,
+ wordWrapColumn = 110,
+ wordWrapMinified = 111,
+ wrappingIndent = 112,
+ wrappingStrategy = 113,
+ showDeprecated = 114,
+ editorClassName = 115,
+ pixelRatio = 116,
+ tabFocusMode = 117,
+ layoutInfo = 118,
+ wrappingInfo = 119
}
/**
diff --git a/src/vs/editor/contrib/smartSelect/smartSelect.ts b/src/vs/editor/contrib/smartSelect/smartSelect.ts
index 714a27d7e48631fd72600fb00b850f44de33313f..713d850325d727ec4c7118abbbb2c90be09f8118 100644
--- a/src/vs/editor/contrib/smartSelect/smartSelect.ts
+++ b/src/vs/editor/contrib/smartSelect/smartSelect.ts
@@ -23,9 +23,7 @@ import { WordSelectionRangeProvider } from 'vs/editor/contrib/smartSelect/wordSe
import { BracketSelectionRangeProvider } from 'vs/editor/contrib/smartSelect/bracketSelections';
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import { onUnexpectedExternalError } from 'vs/base/common/errors';
-import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
-import { ConfigurationScope, Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
-import { Registry } from 'vs/platform/registry/common/platform';
+import { EditorOption } from 'vs/editor/common/config/editorOptions';
class SelectionRanges {
@@ -50,49 +48,36 @@ class SelectionRanges {
class SmartSelectController implements IEditorContribution {
- public static readonly ID = 'editor.contrib.smartSelectController';
+ static readonly ID = 'editor.contrib.smartSelectController';
static get(editor: ICodeEditor): SmartSelectController {
return editor.getContribution(SmartSelectController.ID);
}
- private readonly _editor: ICodeEditor;
-
private _state?: SelectionRanges[];
private _selectionListener?: IDisposable;
private _ignoreSelection: boolean = false;
- constructor(
- editor: ICodeEditor,
- @ITextResourceConfigurationService private readonly _configService: ITextResourceConfigurationService,
- ) {
- this._editor = editor;
- }
+ constructor(private readonly _editor: ICodeEditor) { }
dispose(): void {
this._selectionListener?.dispose();
}
- run(forward: boolean): Promise | void {
+ async run(forward: boolean): Promise {
if (!this._editor.hasModel()) {
return;
}
const selections = this._editor.getSelections();
const model = this._editor.getModel();
-
if (!modes.SelectionRangeRegistry.has(model)) {
return;
}
-
- let promise: Promise = Promise.resolve(undefined);
-
if (!this._state) {
- const selectLeadingAndTrailingWhitespace = this._configService.getValue(model.uri, 'editor.smartSelect.selectLeadingAndTrailingWhitespace') ?? true;
-
- promise = provideSelectionRanges(model, selections.map(s => s.getPosition()), { selectLeadingAndTrailingWhitespace }, CancellationToken.None).then(ranges => {
+ await provideSelectionRanges(model, selections.map(s => s.getPosition()), this._editor.getOption(EditorOption.smartSelect), CancellationToken.None).then(ranges => {
if (!arrays.isNonEmptyArray(ranges) || ranges.length !== selections.length) {
// invalid result
return;
@@ -125,21 +110,18 @@ class SmartSelectController implements IEditorContribution {
});
}
- return promise.then(() => {
- if (!this._state) {
- // no state
- return;
- }
- this._state = this._state.map(state => state.mov(forward));
- const selections = this._state.map(state => Selection.fromPositions(state.ranges[state.index].getStartPosition(), state.ranges[state.index].getEndPosition()));
- this._ignoreSelection = true;
- try {
- this._editor.setSelections(selections);
- } finally {
- this._ignoreSelection = false;
- }
-
- });
+ if (!this._state) {
+ // no state
+ return;
+ }
+ this._state = this._state.map(state => state.mov(forward));
+ const newSelections = this._state.map(state => Selection.fromPositions(state.ranges[state.index].getStartPosition(), state.ranges[state.index].getEndPosition()));
+ this._ignoreSelection = true;
+ try {
+ this._editor.setSelections(newSelections);
+ } finally {
+ this._ignoreSelection = false;
+ }
}
}
@@ -186,21 +168,6 @@ class GrowSelectionAction extends AbstractSmartSelect {
}
}
-//todo@jrieken use proper editor config instead. however, to keep the number
-// of changes low use the quick config definition
-Registry.as(Extensions.Configuration).registerConfiguration({
- id: 'editor',
- properties: {
- 'editor.smartSelect.selectLeadingAndTrailingWhitespace': {
- scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
- description: nls.localize('selectLeadingAndTrailingWhitespace', "Weather leading and trailing whitespace should always be selected."),
- default: true,
- type: 'boolean'
- }
- }
-});
-
-
// renamed command id
CommandsRegistry.registerCommandAlias('editor.action.smartSelect.grow', 'editor.action.smartSelect.expand');
@@ -241,7 +208,7 @@ export interface SelectionRangesOptions {
selectLeadingAndTrailingWhitespace: boolean
}
-export function provideSelectionRanges(model: ITextModel, positions: Position[], options: SelectionRangesOptions, token: CancellationToken): Promise {
+export async function provideSelectionRanges(model: ITextModel, positions: Position[], options: SelectionRangesOptions, token: CancellationToken): Promise {
const providers = modes.SelectionRangeRegistry.all(model);
@@ -271,66 +238,65 @@ export function provideSelectionRanges(model: ITextModel, positions: Position[],
}, onUnexpectedExternalError));
}
- return Promise.all(work).then(() => {
+ await Promise.all(work);
- return allRawRanges.map(oneRawRanges => {
+ return allRawRanges.map(oneRawRanges => {
- if (oneRawRanges.length === 0) {
- return [];
- }
-
- // sort all by start/end position
- oneRawRanges.sort((a, b) => {
- if (Position.isBefore(a.getStartPosition(), b.getStartPosition())) {
- return 1;
- } else if (Position.isBefore(b.getStartPosition(), a.getStartPosition())) {
- return -1;
- } else if (Position.isBefore(a.getEndPosition(), b.getEndPosition())) {
- return -1;
- } else if (Position.isBefore(b.getEndPosition(), a.getEndPosition())) {
- return 1;
- } else {
- return 0;
- }
- });
+ if (oneRawRanges.length === 0) {
+ return [];
+ }
- // remove ranges that don't contain the former range or that are equal to the
- // former range
- let oneRanges: Range[] = [];
- let last: Range | undefined;
- for (const range of oneRawRanges) {
- if (!last || (Range.containsRange(range, last) && !Range.equalsRange(range, last))) {
- oneRanges.push(range);
- last = range;
- }
+ // sort all by start/end position
+ oneRawRanges.sort((a, b) => {
+ if (Position.isBefore(a.getStartPosition(), b.getStartPosition())) {
+ return 1;
+ } else if (Position.isBefore(b.getStartPosition(), a.getStartPosition())) {
+ return -1;
+ } else if (Position.isBefore(a.getEndPosition(), b.getEndPosition())) {
+ return -1;
+ } else if (Position.isBefore(b.getEndPosition(), a.getEndPosition())) {
+ return 1;
+ } else {
+ return 0;
}
+ });
- if (!options.selectLeadingAndTrailingWhitespace) {
- return oneRanges;
+ // remove ranges that don't contain the former range or that are equal to the
+ // former range
+ let oneRanges: Range[] = [];
+ let last: Range | undefined;
+ for (const range of oneRawRanges) {
+ if (!last || (Range.containsRange(range, last) && !Range.equalsRange(range, last))) {
+ oneRanges.push(range);
+ last = range;
}
+ }
- // add ranges that expand trivia at line starts and ends whenever a range
- // wraps onto the a new line
- let oneRangesWithTrivia: Range[] = [oneRanges[0]];
- for (let i = 1; i < oneRanges.length; i++) {
- const prev = oneRanges[i - 1];
- const cur = oneRanges[i];
- if (cur.startLineNumber !== prev.startLineNumber || cur.endLineNumber !== prev.endLineNumber) {
- // add line/block range without leading/failing whitespace
- const rangeNoWhitespace = new Range(prev.startLineNumber, model.getLineFirstNonWhitespaceColumn(prev.startLineNumber), prev.endLineNumber, model.getLineLastNonWhitespaceColumn(prev.endLineNumber));
- if (rangeNoWhitespace.containsRange(prev) && !rangeNoWhitespace.equalsRange(prev) && cur.containsRange(rangeNoWhitespace) && !cur.equalsRange(rangeNoWhitespace)) {
- oneRangesWithTrivia.push(rangeNoWhitespace);
- }
- // add line/block range
- const rangeFull = new Range(prev.startLineNumber, 1, prev.endLineNumber, model.getLineMaxColumn(prev.endLineNumber));
- if (rangeFull.containsRange(prev) && !rangeFull.equalsRange(rangeNoWhitespace) && cur.containsRange(rangeFull) && !cur.equalsRange(rangeFull)) {
- oneRangesWithTrivia.push(rangeFull);
- }
+ if (!options.selectLeadingAndTrailingWhitespace) {
+ return oneRanges;
+ }
+
+ // add ranges that expand trivia at line starts and ends whenever a range
+ // wraps onto the a new line
+ let oneRangesWithTrivia: Range[] = [oneRanges[0]];
+ for (let i = 1; i < oneRanges.length; i++) {
+ const prev = oneRanges[i - 1];
+ const cur = oneRanges[i];
+ if (cur.startLineNumber !== prev.startLineNumber || cur.endLineNumber !== prev.endLineNumber) {
+ // add line/block range without leading/failing whitespace
+ const rangeNoWhitespace = new Range(prev.startLineNumber, model.getLineFirstNonWhitespaceColumn(prev.startLineNumber), prev.endLineNumber, model.getLineLastNonWhitespaceColumn(prev.endLineNumber));
+ if (rangeNoWhitespace.containsRange(prev) && !rangeNoWhitespace.equalsRange(prev) && cur.containsRange(rangeNoWhitespace) && !cur.equalsRange(rangeNoWhitespace)) {
+ oneRangesWithTrivia.push(rangeNoWhitespace);
+ }
+ // add line/block range
+ const rangeFull = new Range(prev.startLineNumber, 1, prev.endLineNumber, model.getLineMaxColumn(prev.endLineNumber));
+ if (rangeFull.containsRange(prev) && !rangeFull.equalsRange(rangeNoWhitespace) && cur.containsRange(rangeFull) && !cur.equalsRange(rangeFull)) {
+ oneRangesWithTrivia.push(rangeFull);
}
- oneRangesWithTrivia.push(cur);
}
- return oneRangesWithTrivia;
- });
+ oneRangesWithTrivia.push(cur);
+ }
+ return oneRangesWithTrivia;
});
}
diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts
index 7f087368097e3237cea28093a2f0a86373dcd48c..a932e9f18de7daf68a6d825b76025b74450c311b 100644
--- a/src/vs/monaco.d.ts
+++ b/src/vs/monaco.d.ts
@@ -2909,6 +2909,10 @@ declare namespace monaco.editor {
* Suggest options.
*/
suggest?: ISuggestOptions;
+ /**
+ * Smart select opptions;
+ */
+ smartSelect?: ISmartSelectOptions;
/**
*
*/
@@ -3821,6 +3825,12 @@ declare namespace monaco.editor {
export type InternalSuggestOptions = Readonly>;
+ export interface ISmartSelectOptions {
+ selectLeadingAndTrailingWhitespace?: boolean;
+ }
+
+ export type SmartSelectOptions = Readonly>;
+
/**
* Describes how to indent wrapped lines.
*/
@@ -3945,31 +3955,32 @@ declare namespace monaco.editor {
showFoldingControls = 91,
showUnused = 92,
snippetSuggestions = 93,
- smoothScrolling = 94,
- stopRenderingLineAfter = 95,
- suggest = 96,
- suggestFontSize = 97,
- suggestLineHeight = 98,
- suggestOnTriggerCharacters = 99,
- suggestSelection = 100,
- tabCompletion = 101,
- tabIndex = 102,
- unusualLineTerminators = 103,
- useTabStops = 104,
- wordSeparators = 105,
- wordWrap = 106,
- wordWrapBreakAfterCharacters = 107,
- wordWrapBreakBeforeCharacters = 108,
- wordWrapColumn = 109,
- wordWrapMinified = 110,
- wrappingIndent = 111,
- wrappingStrategy = 112,
- showDeprecated = 113,
- editorClassName = 114,
- pixelRatio = 115,
- tabFocusMode = 116,
- layoutInfo = 117,
- wrappingInfo = 118
+ smartSelect = 94,
+ smoothScrolling = 95,
+ stopRenderingLineAfter = 96,
+ suggest = 97,
+ suggestFontSize = 98,
+ suggestLineHeight = 99,
+ suggestOnTriggerCharacters = 100,
+ suggestSelection = 101,
+ tabCompletion = 102,
+ tabIndex = 103,
+ unusualLineTerminators = 104,
+ useTabStops = 105,
+ wordSeparators = 106,
+ wordWrap = 107,
+ wordWrapBreakAfterCharacters = 108,
+ wordWrapBreakBeforeCharacters = 109,
+ wordWrapColumn = 110,
+ wordWrapMinified = 111,
+ wrappingIndent = 112,
+ wrappingStrategy = 113,
+ showDeprecated = 114,
+ editorClassName = 115,
+ pixelRatio = 116,
+ tabFocusMode = 117,
+ layoutInfo = 118,
+ wrappingInfo = 119
}
export const EditorOptions: {
acceptSuggestionOnCommitCharacter: IEditorOption;
@@ -4067,6 +4078,7 @@ declare namespace monaco.editor {
showUnused: IEditorOption;
showDeprecated: IEditorOption;
snippetSuggestions: IEditorOption;
+ smartSelect: IEditorOption;
smoothScrolling: IEditorOption;
stopRenderingLineAfter: IEditorOption;
suggest: IEditorOption;
@@ -6199,12 +6211,6 @@ declare namespace monaco.languages {
needsConfirmation: boolean;
label: string;
description?: string;
- iconPath?: {
- id: string;
- } | Uri | {
- light: Uri;
- dark: Uri;
- };
}
export interface WorkspaceFileEditOptions {
diff --git a/src/vs/platform/environment/common/argv.ts b/src/vs/platform/environment/common/argv.ts
index 409bb7e1960c9c06485a6f6d7f39b2efce451d56..434804ca643c498361826176184a7579bb8d524d 100644
--- a/src/vs/platform/environment/common/argv.ts
+++ b/src/vs/platform/environment/common/argv.ts
@@ -78,6 +78,7 @@ export interface NativeParsedArgs {
'force-user-env'?: boolean;
'sync'?: 'on' | 'off';
'__sandbox'?: boolean;
+ 'logsPath'?: string;
// chromium command line args: https://electronjs.org/docs/all#supported-chrome-command-line-switches
'no-proxy-server'?: boolean;
diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts
index 149e6ffb41a82f1a69cf37f105a31872ad4af8b4..d2d8ca659a82f52d5ab5f6ece01f2098aca161fc 100644
--- a/src/vs/platform/environment/node/argv.ts
+++ b/src/vs/platform/environment/node/argv.ts
@@ -112,6 +112,7 @@ export const OPTIONS: OptionDescriptions> = {
'force-user-env': { type: 'boolean' },
'open-devtools': { type: 'boolean' },
'__sandbox': { type: 'boolean' },
+ 'logsPath': { type: 'string' },
// chromium flags
'no-proxy-server': { type: 'boolean' },
diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts
index 80f68fb1decfd1c4fa1bcc30840900240df83f76..1e67add46128f559965604103f1014771123146e 100644
--- a/src/vs/platform/environment/node/environmentService.ts
+++ b/src/vs/platform/environment/node/environmentService.ts
@@ -204,12 +204,11 @@ export class NativeEnvironmentService implements INativeEnvironmentService {
get disableTelemetry(): boolean { return !!this._args['disable-telemetry']; }
constructor(protected _args: NativeParsedArgs) {
- if (!process.env['VSCODE_LOGS']) {
+ if (!_args.logsPath) {
const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '');
- process.env['VSCODE_LOGS'] = path.join(this.userDataPath, 'logs', key);
+ _args.logsPath = path.join(this.userDataPath, 'logs', key);
}
-
- this.logsPath = process.env['VSCODE_LOGS']!;
+ this.logsPath = _args.logsPath;
}
}
diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts
index d604ebe18adfd86d6130ab31ccad118c7c04451d..c71a163ff963669a76244bc329ba724073b650fa 100644
--- a/src/vs/platform/list/browser/listService.ts
+++ b/src/vs/platform/list/browser/listService.ts
@@ -118,14 +118,15 @@ function createScopedContextKeyService(contextKeyService: IContextKeyService, wi
return result;
}
-export const multiSelectModifierSettingKey = 'workbench.list.multiSelectModifier';
-export const openModeSettingKey = 'workbench.list.openMode';
-export const horizontalScrollingKey = 'workbench.list.horizontalScrolling';
-export const keyboardNavigationSettingKey = 'workbench.list.keyboardNavigation';
-export const automaticKeyboardNavigationSettingKey = 'workbench.list.automaticKeyboardNavigation';
+const multiSelectModifierSettingKey = 'workbench.list.multiSelectModifier';
+const openModeSettingKey = 'workbench.list.openMode';
+const horizontalScrollingKey = 'workbench.list.horizontalScrolling';
+const keyboardNavigationSettingKey = 'workbench.list.keyboardNavigation';
+const automaticKeyboardNavigationSettingKey = 'workbench.list.automaticKeyboardNavigation';
const treeIndentKey = 'workbench.tree.indent';
const treeRenderIndentGuidesKey = 'workbench.tree.renderIndentGuides';
const listSmoothScrolling = 'workbench.list.smoothScrolling';
+const treeExpandOnFolderClick = 'workbench.tree.expandOnFolderClick';
function useAltAsMultipleSelectionModifier(configurationService: IConfigurationService): boolean {
return configurationService.getValue(multiSelectModifierSettingKey) === 'alt';
@@ -831,7 +832,8 @@ function workbenchTreeDataPreamble(treeExpandOnFolderClick)
} as TOptions
};
}
@@ -933,6 +935,9 @@ class WorkbenchTreeInternals {
if (e.affectsConfiguration(openModeSettingKey)) {
newOptions = { ...newOptions, expandOnlyOnDoubleClick: configurationService.getValue(openModeSettingKey) === 'doubleClick' };
}
+ if (e.affectsConfiguration(treeExpandOnFolderClick)) {
+ newOptions = { ...newOptions, expandOnlyOnTwistieClick: !configurationService.getValue(treeExpandOnFolderClick) };
+ }
if (Object.keys(newOptions).length > 0) {
tree.updateOptions(newOptions);
}
@@ -1036,6 +1041,11 @@ configurationRegistry.registerConfiguration({
'type': 'boolean',
'default': true,
markdownDescription: localize('automatic keyboard navigation setting', "Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")
+ },
+ [treeExpandOnFolderClick]: {
+ type: 'boolean',
+ default: true,
+ description: localize('list expand on folder click setting', "Controls whether tree folders are expanded when clicking the folder names."),
}
}
});
diff --git a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts
index f36f5f0e9c35e8af366c408eed1bffb888bb720c..6781ca2fb4243387f62179321fbf47986d835cb2 100644
--- a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts
+++ b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts
@@ -128,7 +128,7 @@ export class BulkEditPane extends ViewPane {
this._tree = >this._instaService.createInstance(
WorkbenchAsyncDataTree, this.id, treeContainer,
new BulkEditDelegate(),
- [new TextEditElementRenderer(), this._instaService.createInstance(FileElementRenderer, resourceLabels), new CategoryElementRenderer()],
+ [this._instaService.createInstance(TextEditElementRenderer), this._instaService.createInstance(FileElementRenderer, resourceLabels), this._instaService.createInstance(CategoryElementRenderer)],
this._treeDataSource,
{
accessibilityProvider: this._instaService.createInstance(BulkEditAccessibilityProvider),
diff --git a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts
index 4db2acf28b7e7444f344cb3a932c678fdd1e001c..e9dddb2a289cce07ac71590c1e4044b9e3821f61 100644
--- a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts
+++ b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts
@@ -21,7 +21,7 @@ import { ILabelService } from 'vs/platform/label/common/label';
import type { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
import { IconLabel } from 'vs/base/browser/ui/iconLabel/iconLabel';
import { basename } from 'vs/base/common/resources';
-import { ThemeIcon } from 'vs/platform/theme/common/themeService';
+import { IThemeService, ThemeIcon } from 'vs/platform/theme/common/themeService';
import { compare } from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri';
import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo';
@@ -386,6 +386,8 @@ export class CategoryElementRenderer implements ITreeRenderer, _index: number, template: TextEditElementTemplate): void {
diff --git a/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css b/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css
index 7257c3e62c687df16f0f99bd0bb0adc3de05f5ff..8d645ccaa6603f6624a91732427d97d74a1a55dd 100644
--- a/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css
+++ b/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css
@@ -76,7 +76,6 @@
}
.explorer-viewlet .explorer-item .monaco-icon-name-container.multiple > .label-name > .monaco-highlighted-label {
- padding: 1px;
border-radius: 3px;
}
diff --git a/src/vs/workbench/contrib/preferences/browser/tocTree.ts b/src/vs/workbench/contrib/preferences/browser/tocTree.ts
index 2078f7824c1743695c9ae59ca131a107ed6e1481..4413f074aac09b387ed0fbaf5d073b41dd8a6038 100644
--- a/src/vs/workbench/contrib/preferences/browser/tocTree.ts
+++ b/src/vs/workbench/contrib/preferences/browser/tocTree.ts
@@ -217,7 +217,8 @@ export class TOCTree extends WorkbenchObjectTree {
styleController: id => new DefaultStyleController(DOM.createStyleSheet(container), id),
accessibilityProvider: instantiationService.createInstance(SettingsAccessibilityProvider),
collapseByDefault: true,
- horizontalScrolling: false
+ horizontalScrolling: false,
+ hideTwistiesOfChildlessElements: true
};
super(