summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-12-21 22:38:16 -0800
committerGeorge Fraser <george@fivetran.com>2018-12-21 22:38:16 -0800
commitd23ac72c88dbcc0ef5a3fe440a4c66678ec727f3 (patch)
tree35d452f65190f5b4920c995a0fe7b909c6805e34 /lib
parent248b325b0ae672bcfac1bf61d2e5f540eb0a056d (diff)
downloadjava-language-server-d23ac72c88dbcc0ef5a3fe440a4c66678ec727f3.zip
Use beginning-of-line
Diffstat (limited to 'lib')
-rw-r--r--lib/java.tmLanguage.json135
1 files changed, 132 insertions, 3 deletions
diff --git a/lib/java.tmLanguage.json b/lib/java.tmLanguage.json
index 53d3374..68b9299 100644
--- a/lib/java.tmLanguage.json
+++ b/lib/java.tmLanguage.json
@@ -66,7 +66,7 @@
"name": "punctuation.definition.tag.right"
}
},
- "name": "meta.declaration.annotation.java",
+ "name": "meta.annotation.java",
"patterns": [
{
"captures": {
@@ -136,6 +136,112 @@
}
]
},
+ "line": {
+ "patterns": [
+ {
+ "begin": "^ *([A-Z]\\w*|byte|short|int|long|char|float|double|boolean) +(?=\\w)",
+ "end": "(?=[=,:;])|$",
+ "name": "markup.underline.simple.java",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.java"
+ }
+ },
+ "patterns": [
+ {
+ "match": "\\b([a-z]\\w*)\\b",
+ "name": "variable.java"
+ }
+ ]
+ },
+ {
+ "begin": "^ *([A-Z]\\w*|byte|short|int|long|char|float|double|boolean)(?=\\[\\])",
+ "end": "(?=[=,:;])|$",
+ "name": "markup.underline.array.java",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.java"
+ }
+ },
+ "patterns": [
+ {
+ "match": "[\\[\\]]+",
+ "name": "keyword.other.java"
+ },
+ {
+ "match": "\\b([a-z]\\w*)\\b",
+ "name": "variable.java"
+ }
+ ]
+ },
+ {
+ "begin": "^ *([A-Z]\\w*)(?=<[^>])",
+ "end": "(?=[=,:;])|$",
+ "name": "markup.underline.parameterized.java",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.java"
+ }
+ },
+ "patterns": [
+ {
+ "match": "(?<GROUP><([^<>]|\\g<GROUP>)+>)",
+ "name": "meta.type-parameters.java",
+ "captures": {
+ "0": {
+ "patterns": [
+ {
+ "match": "\\b\\w+\\b",
+ "name": "storage.type.java"
+ },
+ {
+ "match": "[<>,\\.\\?]|extends|super",
+ "name": "keyword.other.java"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "match": "\\b([a-z]\\w*)\\b",
+ "name": "variable.java"
+ }
+ ]
+ },
+ {
+ "begin": "^ *(var)\\b",
+ "end": "(?=[=,:;])|$",
+ "name": "markup.underline.var.java",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.other.var.java"
+ }
+ },
+ "patterns": [
+ {
+ "match": "\\b([a-z]\\w*)\\b",
+ "name": "variable.java"
+ }
+ ]
+ },
+ {
+ "begin": "^ *(final)\\b",
+ "end": "(?=[=,:;])|$",
+ "name": "markup.underline.final.java",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.other.final.java"
+ }
+ },
+ "patterns": [
+
+ ]
+ },
+ {
+ "include": "#code"
+ }
+ ]
+ },
"code": {
"patterns": [
{
@@ -184,7 +290,7 @@
]
},
{
- "begin": "(new)",
+ "begin": "\\b(new)\\b",
"end": "$",
"beginCaptures": {
"1": {
@@ -224,11 +330,34 @@
"name": "meta.block.java",
"patterns": [
{
- "include": "#code"
+ "include": "#line"
}
]
},
{
+ "begin": "\\b(catch)\\b",
+ "end": "(?={)",
+ "name": "meta.catch.java",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.catch.java"
+ }
+ },
+ "patterns": [
+ {
+ "match": "\\b[A-Z]\\w*\\b",
+ "name": "storage.type.java"
+ },
+ {
+ "match": "\\b[a-z]\\w*\\b",
+ "name": "storage.type.java"
+ }
+ ]
+ },
+ {
+ "include": "#declarations"
+ },
+ {
"include": "#annotation"
},
{