aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit/syntax_rules
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/syntax_rules')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax49
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax2
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax2
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax4
4 files changed, 53 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax
new file mode 100644
index 00000000..3eff96c1
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax
@@ -0,0 +1,49 @@
+# Syntax support file for the Lumina Text Editor
+# ===================================
+# Go language support rules
+# Written by Zackary Welch <zwelch@ixsystems.com>
+# Released under the 2-clause BSD license
+# ===================================
+
+{
+ "meta": {
+ "name": "Go",
+ "file_suffix": ["go"]
+ },
+ "format": {
+ "line_wrap": false,
+ "highlight_whitespace_eol" : false
+ },
+ "rules": [{
+ "name": "keywords",
+ "words": ["break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct", "chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "type", "continue", "for", "import", "return", "var", "uint32", "uint64", "float32", "float64"],
+ "foreground": "colors/keyword"
+ },
+ {
+ "name": "single-line comment",
+ "regex": "//[^\n]*",
+ "foreground": "colors/comment"
+ },
+ {
+ "name": "multi-line comment",
+ "regex_start": "/\\*",
+ "regex_end": "\\*/",
+ "foreground": "colors/comment"
+ },
+ {
+ "name": "numbers",
+ "regex": "\\b[0-9]+\\.?[0-9]*\\b|[0-9]+e[\\+\\-]?[0-9]+",
+ "foreground": "colors/altkeyword"
+ },
+ {
+ "name": "function names",
+ "regex": "\\b[A-Za-z0-9_]+(?=\\()",
+ "foreground": "colors/class"
+ },
+ {
+ "name" : "text",
+ "regex": "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'",
+ "foreground" : "colors/text"
+ }
+ ]
+}
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax
index bb179be4..02e1092a 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax
@@ -32,7 +32,7 @@
},
{
"name": "numbers",
- "regex": "\\b([0-9]+[\\.]?[0-9]?)+\\b",
+ "regex": "\\b[0-9]+\\.?[0-9]*\\b",
"foreground": "colors/altkeyword"
},
{
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax
index fdca7211..ab67d384 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/json.syntax
@@ -8,7 +8,7 @@
{
"meta": {
"name": "JSON",
- "file_suffix": ["json"]
+ "file_suffix": ["json", "syntax"]
},
"format": {
"line_wrap": false,
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax
index 1aa906d4..15f6e2a5 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax
@@ -16,7 +16,7 @@
},
"rules": [{
"name": "keywords",
- "words": ["private", "public", "class", "function", "const", "return", "if", "else", "bool", "abstract", "and", "as", "break", "case", "catch", "const", "do", "echo", "elseif", "default", "endif", "endfor", "final", "for", "foreach", "extends", "global", "include", "interface", "new", "or", "protected", "require", "static", "switch", "throw", "try", "use", "var", "while", "xor"],
+ "words": ["private", "public", "class", "function", "const", "return", "if", "else", "bool", "abstract", "and", "as", "break", "case", "catch", "const", "do", "echo", "int", "elseif", "default", "endif", "endfor", "final", "for", "foreach", "extends", "global", "include", "interface", "new", "or", "protected", "require", "static", "switch", "throw", "try", "use", "var", "while", "xor"],
"foreground": "colors/keyword"
},
{
@@ -32,7 +32,7 @@
},
{
"name": "numbers",
- "regex": "\\b([0-9]+[\\.]?[0-9]?)+\\b",
+ "regex": "\\b[0-9]+\\.?[0-9]*\\b",
"foreground": "colors/altkeyword"
},
{
bgstack15