diff options
author | George Fraser <george@fivetran.com> | 2018-12-22 11:35:09 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-12-22 11:35:09 -0800 |
commit | 287e4fdd496b674f1f026a7a369761fc7bf22da6 (patch) | |
tree | 0334f743084d9ca43e350164d34e2b51c0b57f4d /lib | |
parent | c7f31242c653f628902b890e2bc09090bb378e96 (diff) | |
download | java-language-server-287e4fdd496b674f1f026a7a369761fc7bf22da6.zip |
More precise vars
Diffstat (limited to 'lib')
-rw-r--r-- | lib/java.tmLanguage.json | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/lib/java.tmLanguage.json b/lib/java.tmLanguage.json index 41aee12..30e432b 100644 --- a/lib/java.tmLanguage.json +++ b/lib/java.tmLanguage.json @@ -139,10 +139,6 @@ "lhs": { "patterns": [ { - "match": "\\b([a-z]\\w*)\\b", - "name": "variable.java" - }, - { "match": "[\\[\\]]+", "name": "keyword.other.java" }, @@ -165,17 +161,44 @@ } }, { - "begin": "=", - "end": "(?=[,;])|$", - "name": "meta.rhs.java", + "begin": "\\b(\\w+)\\b", + "end": "(?=;)|$", "beginCaptures": { - "0": { - "name": "keyword.other.set.java" + "1": { + "name": "variable.java" } }, "patterns": [ { - "include": "#code" + "begin": "=", + "end": "(?=[,;])|$", + "name": "meta.rhs.java", + "beginCaptures": { + "0": { + "name": "keyword.other.set.java" + } + }, + "patterns": [ + { + "TODO": "separate defs for class body", + "include": "#code" + } + ] + }, + { + "begin": ",", + "end": "\\b(\\w+)\\b", + "name": "meta.continue.java", + "beginCaptures": { + "0": { + "name": "keyword.other.comma.java" + } + }, + "endCaptures": { + "1": { + "name": "variable.java" + } + } } ] } |