diff options
author | msrocka <michael.srocka@gmail.com> | 2021-09-10 07:53:58 +0200 |
---|---|---|
committer | msrocka <michael.srocka@gmail.com> | 2021-09-10 07:53:58 +0200 |
commit | a1bad0e63b8070ecf7b1b7fdc7d74175bb168c86 (patch) | |
tree | 4811c3832a72a99c8f80e40a58125ae44940c959 /plugins | |
parent | 914ab5ca70155ca16fb7ddd9d15d32a452d7dee6 (diff) | |
download | lite-xl-plugins-a1bad0e63b8070ecf7b1b7fdc7d74175bb168c86.tar.gz lite-xl-plugins-a1bad0e63b8070ecf7b1b7fdc7d74175bb168c86.zip |
updated the Java keyword list
taken from https://docs.oracle.com/javase/specs/jls/se16/html/jls-3.html#jls-3.9
(e.g. `then` is not a keyword in Java)
I also added the context restricted keywords `var`, `record` etc. to the list;
see https://en.wikipedia.org/wiki/List_of_Java_keywords
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/language_java.lua | 106 |
1 files changed, 57 insertions, 49 deletions
diff --git a/plugins/language_java.lua b/plugins/language_java.lua index 8c6e98e..e6d3735 100644 --- a/plugins/language_java.lua +++ b/plugins/language_java.lua @@ -20,55 +20,63 @@ syntax.add { { pattern = "[%a_][%w_]*", type = "symbol" }, }, symbols = { - ["if"] = "keyword", - ["then"] = "keyword", - ["else"] = "keyword", - ["else if"] = "keyword", - ["do"] = "keyword", - ["while"] = "keyword", - ["for"] = "keyword", - ["new"] = "keyword", - ["break"] = "keyword", - ["continue"] = "keyword", - ["return"] = "keyword", - ["goto"] = "keyword", - ["class"] = "keyword", - ["implements"] = "keyword", - ["extends"] = "keyword", - ["private"] = "keyword", - ["protected"] = "keyword", - ["public"] = "keyword", - ["abstract"] = "keyword", - ["interface"] = "keyword", - ["assert"] = "keyword", - ["import"] = "keyword", - ["native"] = "keyword", - ["package"] = "keyword", - ["super"] = "keyword", - ["synchronized"] = "keyword", - ["instanceof"] = "keyword", - ["enum"] = "keyword", - ["catch"] = "keyword", - ["throw"] = "keyword", - ["throws"] = "keyword", - ["try"] = "keyword", - ["transient"] = "keyword", - ["finally"] = "keyword", - ["static"] = "keyword", - ["volatile"] = "keyword", - ["final"] = "keyword", - ["switch"] = "keyword", - ["case"] = "keyword", - ["default"] = "keyword", - ["void"] = "keyword", - ["int"] = "keyword2", - ["short"] = "keyword2", - ["byte"] = "keyword2", - ["long"] = "keyword2", - ["float"] = "keyword2", - ["double"] = "keyword2", - ["char"] = "keyword2", - ["boolean"] = "keyword2", + ["abstract"] = "keyword", + ["assert"] = "keyword", + ["break"] = "keyword", + ["case"] = "keyword", + ["catch"] = "keyword", + ["class"] = "keyword", + ["const"] = "keyword", + ["continue"] = "keyword", + ["default"] = "keyword", + ["do"] = "keyword", + ["else"] = "keyword", + ["enum"] = "keyword", + ["extends"] = "keyword", + ["final"] = "keyword", + ["finally"] = "keyword", + ["for"] = "keyword", + ["if"] = "keyword", + ["goto"] = "keyword", + ["implements"] = "keyword", + ["import"] = "keyword", + ["instanceof"] = "keyword", + ["interface"] = "keyword", + ["native"] = "keyword", + ["new"] = "keyword", + ["package"] = "keyword", + ["permits"] = "keyword", + ["private"] = "keyword", + ["protected"] = "keyword", + ["public"] = "keyword", + ["record"] = "keyword", + ["return"] = "keyword", + ["sealed"] = "keyword", + ["static"] = "keyword", + ["strictfp"] = "keyword", + ["super"] = "keyword", + ["switch"] = "keyword", + ["synchronized"] = "keyword", + ["this"] = "keyword", + ["throw"] = "keyword", + ["throws"] = "keyword", + ["transient"] = "keyword", + ["try"] = "keyword", + ["var"] = "keyword", + ["void"] = "keyword", + ["volatile"] = "keyword", + ["while"] = "keyword", + ["yield"] = "keyword", + + ["boolean"] = "keyword2", + ["byte"] = "keyword2", + ["char"] = "keyword2", + ["double"] = "keyword2", + ["float"] = "keyword2", + ["int"] = "keyword2", + ["long"] = "keyword2", + ["short"] = "keyword2", + ["true"] = "literal", ["false"] = "literal", ["null"] = "literal", |