diff options
author | George Fraser <george@fivetran.com> | 2018-12-22 14:19:20 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-12-22 14:19:20 -0800 |
commit | 0998f5cd34b7b1f281273290945bf08a42a40dec (patch) | |
tree | 11f2907b5021d5c0c4b7250e047878e6798ac1ab /lib | |
parent | 94509232c164b2405c7d7b11d420c4b22a36d73c (diff) | |
download | java-language-server-0998f5cd34b7b1f281273290945bf08a42a40dec.zip |
For declarations
Diffstat (limited to 'lib')
-rw-r--r-- | lib/java.tmLanguage.json | 147 |
1 files changed, 121 insertions, 26 deletions
diff --git a/lib/java.tmLanguage.json b/lib/java.tmLanguage.json index d9f077d..a00e598 100644 --- a/lib/java.tmLanguage.json +++ b/lib/java.tmLanguage.json @@ -162,6 +162,65 @@ "include": "#class-declaration" }, { + "match": "\\b(\\w+)(?=\\()", + "name": "variable.other.constructor.java" + }, + { + "begin": "\\b([A-Z]\\w*|byte|short|int|long|char|float|double|boolean)\\b", + "end": "\\b\\w+\\b", + "name": "meta.declaration.java", + "beginCaptures": { + "0": { + "name": "storage.type.java" + } + }, + "endCaptures": { + "0": { + "name": "variable.java" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#type-parameters" + }, + { + "include": "#array-parameters" + } + ] + }, + { + "begin": ",", + "end": "\\w+", + "beginCaptures": { + "0": { + "name": "keyword.other.comma.java" + } + }, + "endCaptures": { + "0": { + "name": "variable.java" + } + } + }, + { + "begin": "=", + "end": "(?=[,;])", + "name": "meta.field-init.java", + "beginCaptures": { + "0": { + "name": "keyword.other.set.java" + } + }, + "patterns": [ + { + "include": "#code" + } + ] + }, + { "begin": "\\(", "end": "\\)", "name": "meta.arguments.java", @@ -235,6 +294,12 @@ "lhs": { "patterns": [ { + "include": "#keywords" + }, + { + "include": "#comments" + }, + { "include": "#array-parameters" }, { @@ -365,7 +430,7 @@ }, { "begin": "\\b(new)\\b", - "end": "$", + "end": "(?=[,;])|$", "beginCaptures": { "1": { "name": "keyword.other.new.java" @@ -409,8 +474,9 @@ }, "patterns": [ { - "begin": "(\\w+) +(?=\\w)", - "end": "[:;=]|$", + "begin": "\\b([A-Z]\\w*|byte|short|int|long|char|float|double|boolean|var) +(?=\\w)", + "end": "\\b\\w+\\b", + "name": "meta.declaration.java", "beginCaptures": { "1": { "patterns": [ @@ -420,37 +486,80 @@ ] } }, + "endCaptures": { + "0": { + "name": "variable.java" + } + }, "patterns": [ { - "include": "#for-init" + "include": "#comments" + }, + { + "include": "#type-parameters" + }, + { + "include": "#array-parameters" } ] }, { - "begin": "([A-Z]\\w*)(?=<[^>])", - "end": "[:;=]|$", + "begin": "\\b([A-Z]\\w*|byte|short|int|long|char|float|double|boolean)(?=\\[\\])", + "end": "\\b\\w+\\b", + "name": "meta.declaration.java", "beginCaptures": { "1": { - "name": "storage.type.java" + "patterns": [ + { + "include": "#type-name" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "variable.java" } }, "patterns": [ { - "include": "#for-init" + "include": "#comments" + }, + { + "include": "#type-parameters" + }, + { + "include": "#array-parameters" } ] }, { - "begin": "(\\w+)(?=\\[\\])", - "end": "[:;=]|$", + "begin": "\\b([A-Z]\\w*)(?=<[^>])", + "end": "\\b\\w+\\b", + "name": "meta.declaration.java", "beginCaptures": { "1": { - "name": "storage.type.java" + "patterns": [ + { + "include": "#type-name" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "variable.java" } }, "patterns": [ { - "include": "#for-init" + "include": "#comments" + }, + { + "include": "#type-parameters" + }, + { + "include": "#array-parameters" } ] }, @@ -774,20 +883,6 @@ "name": "keyword.other.array.java" } ] - }, - "for-init": { - "patterns": [ - { - "include": "#type-parameters" - }, - { - "include": "#array-parameters" - }, - { - "mathc": "\\b\\w+\\b", - "name": "variable.java" - } - ] } } }
\ No newline at end of file |