aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-11-07 11:17:55 +0000
committerGitHub <[email protected]>2020-11-07 11:17:55 +0000
commitf3fe6561c00a07a7d6131db42983cbc3eb658957 (patch)
tree20c65631e8c3d0ab94e5bcaeae54258687a7105f /editors/code
parent1b147306b47bb869a048c510f40083387d4dfe27 (diff)
parent6959cb045ca2ac2bfe87c5408cba4da257716d02 (diff)
Merge #6491
6491: Textmate grammar: allow variables to terminate ranges r=dustypomerleau a=dustypomerleau Variables were originally designed not to match after a dot, in order to avoid matching struct field access, however this resulted in variables that end ranges not being highlighted. In order to fix this we match a preceding dot, only if it's preceded by at least one other dot. Attempting to match on `(\.{2,})?` won't work, because the optional group allows struct field access to match even when one dot is present. Co-authored-by: Dusty Pomerleau <[email protected]>
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/rust.tmGrammar.json2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index f551498ac..608a3354e 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -1127,7 +1127,7 @@
1127 { 1127 {
1128 "comment": "variables", 1128 "comment": "variables",
1129 "name": "variable.other.rust", 1129 "name": "variable.other.rust",
1130 "match": "\\b(?<!\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b" 1130 "match": "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b"
1131 } 1131 }
1132 ] 1132 ]
1133 } 1133 }