diff options
author | Ken Moore <ken@ixsystems.com> | 2019-06-26 08:10:19 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2019-06-26 08:10:19 -0400 |
commit | f02fe1665ed14611d00426a7a71db445d49826fb (patch) | |
tree | 917f0ac3eea6d39c896a89a0c62b222ef270bf89 | |
parent | Just a bunch of whitespace cleanup (diff) | |
download | lumina-f02fe1665ed14611d00426a7a71db445d49826fb.tar.gz lumina-f02fe1665ed14611d00426a7a71db445d49826fb.tar.bz2 lumina-f02fe1665ed14611d00426a7a71db445d49826fb.zip |
Add a new "java.syntax" highlighting ruleset.
Thanks to Mike Remski for sending this in!
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/syntax_rules/java.syntax | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/java.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/java.syntax new file mode 100644 index 00000000..e8bae8b1 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/java.syntax @@ -0,0 +1,63 @@ +# Syntax support file for the Lumina Text Editor +# =================================== +# Java language support rules +# Written by Mike Remski (mremski@comcast.net) +# Released under the 2-clause BSD license +# =================================== + +{ + "meta": { + "name": "Java", + "file_suffix": ["java"] + }, + "format": { + "line_wrap": false, + "highlight_whitespace_eol": true, + "check_spelling": false + }, + "rules": [{ + "name": "multi-line comment", + "regex_start": "/\\*", + "regex_end": "\\*/", + "foreground": "colors/comment" + }, + { + "name": "single-line comment", + "regex": "//[^\n]*", + "foreground": "colors/comment" + }, + { + "name": "keywords", + "words": ["abstract","assert","boolean","byte","catch","char","class","default","do","double","enum","exports","extends","final","finally","float","implements","import","instanceof","int","interface","long","module","native","new","package","private","protected","public","requires","short","static","strictfp","super","synchronized","this","throw","throws","transient","try","void","volatile","true","false","null"], + "foreground": "colors/keyword", + "font_weight": "bold" + }, + { + "name": "alternate keywords", + "words": ["for", "while", "switch", "case", "continue", "break", "if", "else", "return", "exit"], + "foreground": "colors/altkeyword", + "font_weight": "bold" + }, + { + "name": "class names", + "regex": "\\b[A-Za-z0-9_-\\.]+(?=::)\\b", + "foreground": "colors/class", + "font_weight": "bold" + }, + { + "name": "numbers", + "regex" : "\\b[0-9]+\\.?[0-9]*\\b", + "foreground": "colors/text" + }, + { + "name": "function names", + "regex": "\\b[A-Za-z0-9_]+(?=\\()", + "foreground": "colors/function" + }, + { + "name": "text", + "regex": "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'", + "foreground": "colors/text" + } + ] +} |