aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-19 19:08:23 -0400
committerKen Moore <ken@ixsystems.com>2017-06-19 19:08:23 -0400
commite4351bd7dae86ffa7ff4086b4abb270e529c5f4b (patch)
tree667d5b563a7d563222da504b7a112837f78a6626 /src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax
parentFix the migration routine when moving from the "default" monitor ID (vesa, sc... (diff)
parentTranslated using Weblate (lumina_DESKTOP@lt (generated)) (diff)
downloadlumina-e4351bd7dae86ffa7ff4086b4abb270e529c5f4b.tar.gz
lumina-e4351bd7dae86ffa7ff4086b4abb270e529c5f4b.tar.bz2
lumina-e4351bd7dae86ffa7ff4086b4abb270e529c5f4b.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/go.syntax49
1 files changed, 49 insertions, 0 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"
+ }
+ ]
+}
bgstack15