aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDusty Pomerleau <[email protected]>2020-10-26 09:16:26 +0000
committerDusty Pomerleau <[email protected]>2020-10-26 09:16:26 +0000
commitefdcfcfb61a64fee410268bed6a10bf3af7c781f (patch)
tree1787a2b36fafde4a7bddb8d515fad1c6885525cd
parenteae54b5f72baa1c1331720b0a46fe8aab01f186b (diff)
fix: narrow the case where angle brackets are seen as comparison operators
-rw-r--r--editors/code/rust.tmGrammar.json20
1 files changed, 19 insertions, 1 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index 450116df2..1b8cc713a 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -641,10 +641,28 @@
641 }, 641 },
642 { 642 {
643 "comment": "less than, greater than (special case)", 643 "comment": "less than, greater than (special case)",
644 "match": "(^|\\s)(?<!=)([<>])\\s", 644 "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))",
645 "captures": { 645 "captures": {
646 "1": {
647 "name": "punctuation.brackets.round.rust"
648 },
646 "2": { 649 "2": {
650 "name": "punctuation.brackets.square.rust"
651 },
652 "3": {
653 "name": "punctuation.brackets.curly.rust"
654 },
655 "4": {
647 "name": "keyword.operator.comparison.rust" 656 "name": "keyword.operator.comparison.rust"
657 },
658 "5": {
659 "name": "punctuation.brackets.round.rust"
660 },
661 "6": {
662 "name": "punctuation.brackets.square.rust"
663 },
664 "7": {
665 "name": "punctuation.brackets.curly.rust"
648 } 666 }
649 } 667 }
650 }, 668 },