aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-11 08:37:42 -0400
committerKen Moore <ken@ixsystems.com>2017-06-11 08:37:42 -0400
commit6ae407d04db92b53e76f48138f3f74f8c071feca (patch)
tree5f20bd05bfda500335f2772a8c2a7203155d612a /src-qt5/desktop-utils
parentAdd an XML syntax highlighting rule to LTE. Seems fully-functional. (diff)
downloadlumina-6ae407d04db92b53e76f48138f3f74f8c071feca.tar.gz
lumina-6ae407d04db92b53e76f48138f3f74f8c071feca.tar.bz2
lumina-6ae407d04db92b53e76f48138f3f74f8c071feca.zip
Add a new syntax rule set for JSON files. Seems to be working fine.
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax34
1 files changed, 34 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax
new file mode 100644
index 00000000..fdca7211
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax
@@ -0,0 +1,34 @@
+# Syntax support file for the Lumina Text Editor
+# ===================================
+# JSON language support rules
+# Written by Ken Moore <ken@ixsystems.com>
+# Released under the 2-clause BSD license
+# ===================================
+
+{
+ "meta": {
+ "name": "JSON",
+ "file_suffix": ["json"]
+ },
+ "format": {
+ "line_wrap": false,
+ "highlight_whitespace_eol" : true,
+ "tab_width": 8
+ },
+ "rules": [{
+ "name": "keywords",
+ "words": ["true","false"],
+ "foreground": "colors/keyword"
+ },
+ {
+ "name": "numbers",
+ "regex" : "[0-9\\.]+",
+ "foreground": "colors/altkeyword"
+ },
+ {
+ "name" : "strings inside a tag",
+ "regex": "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'",
+ "foreground" : "colors/text"
+ }
+ ]
+}
bgstack15