about summary refs log tree commit diff stats
path: root/atom
diff options
context:
space:
mode:
Diffstat (limited to 'atom')
-rw-r--r--atom/Readme.md3
-rw-r--r--atom/grammars/subx.json27
-rw-r--r--atom/package.json17
-rw-r--r--atom/styles/styles.less16
4 files changed, 63 insertions, 0 deletions
diff --git a/atom/Readme.md b/atom/Readme.md
new file mode 100644
index 00000000..6abde7e8
--- /dev/null
+++ b/atom/Readme.md
@@ -0,0 +1,3 @@
+## Syntax highlighting for the Atom editor
+
+Copy or symlink this directory into `~/.atom/packages/subx`.
diff --git a/atom/grammars/subx.json b/atom/grammars/subx.json
new file mode 100644
index 00000000..d75ddda6
--- /dev/null
+++ b/atom/grammars/subx.json
@@ -0,0 +1,27 @@
+{
+    "scopeName": "source.subx",
+    "name": "SubX",
+    "fileTypes": ["subx"],
+    "patterns": [
+        {
+            "name": "comment.line.subx",
+            "match": "#.*"
+        },
+        {
+            "name": "test.subx",
+            "match": "^test-[^ ]*:"
+        },
+        {
+            "name": "global.subx",
+            "match": "^[A-Z][^ ]*:"
+        },
+        {
+            "name": "function.subx",
+            "match": "^[^_$ #][^ ]*:"
+        },
+        {
+            "name": "label.subx",
+            "match": "^[_$][^ ]*:"
+        }
+    ]
+}
diff --git a/atom/package.json b/atom/package.json
new file mode 100644
index 00000000..a9936fc4
--- /dev/null
+++ b/atom/package.json
@@ -0,0 +1,17 @@
+{
+    "name": "subx",
+    "version": "0.0.1",
+    "description": "Syntax highlighting for SubX files in the Mu computing stack.",
+    "author": "Kartik Agaram",
+    "keywords": [
+        "language",
+        "mu",
+        "syntax",
+        "highlighting"
+    ],
+    "repository": "https://github.com/akkartik/mu",
+    "engines": {
+        "atom": ">=1.0.0 <2.0.0"
+    },
+    "dependencies": {}
+}
diff --git a/atom/styles/styles.less b/atom/styles/styles.less
new file mode 100644
index 00000000..e1a749a3
--- /dev/null
+++ b/atom/styles/styles.less
@@ -0,0 +1,16 @@
+atom-text-editor.editor {
+  .syntax--source.syntax--subx {
+    .syntax--function.syntax--subx {
+      color: orange;
+    }
+    .syntax--global.syntax--subx {
+      color: red;
+    }
+    .syntax--test.syntax--subx {
+      color: #88ff88;
+    }
+    .syntax--label.syntax--subx {
+      color: #448844;
+    }
+  }
+}