summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-10-11 23:50:06 -0700
committerGeorge Fraser <george@fivetran.com>2018-10-11 23:50:06 -0700
commit8844568c090be70a2e9346e698fce57ce3ffcc10 (patch)
treed1dd41f5d3bd091e14265302b949d89321e91b9a /lib
parent10753c3203fa30707d98b1565dc6f6ca81ec5517 (diff)
downloadjava-language-server-8844568c090be70a2e9346e698fce57ce3ffcc10.zip
new
Diffstat (limited to 'lib')
-rw-r--r--lib/java.tmLanguage.json32
1 files changed, 30 insertions, 2 deletions
diff --git a/lib/java.tmLanguage.json b/lib/java.tmLanguage.json
index 43e7a7a..16d3d4a 100644
--- a/lib/java.tmLanguage.json
+++ b/lib/java.tmLanguage.json
@@ -44,8 +44,7 @@
]
},
{
- "match": "\\b(throw|return|break|continue|default|do|while|switch|case|if|else|const|goto)\\b",
- "name": "keyword.java"
+ "include": "#keywords"
},
{
"match": "\\b(private|public|protected|static|final|default)\\b",
@@ -64,6 +63,27 @@
"name": "meta.instanceof.java"
},
{
+ "begin": "\\b(new)\\s+((\\w+\\.)*\\w+)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.new.java"
+ },
+ "2": {
+ "name": "entity.name.class.java"
+ }
+ },
+ "end": "\\(",
+ "name": "meta.new.java",
+ "patterns": [
+ {
+ "include": "#keywords"
+ },
+ {
+ "include": "#class-name"
+ }
+ ]
+ },
+ {
"include": "#constants"
},
{
@@ -71,6 +91,14 @@
}
],
"repository": {
+ "keywords": {
+ "patterns": [
+ {
+ "match": "\\b(throw|return|break|continue|default|do|while|switch|case|if|else|const|goto|extends|implements)\\b",
+ "name": "keyword.java"
+ }
+ ]
+ },
"class-name": {
"patterns": [
{