about summary refs log tree commit diff stats
path: root/subx.dte
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-03-29 12:48:49 -0700
committerKartik Agaram <vc@akkartik.com>2020-03-29 13:25:00 -0700
commitb3b3237391ae9c60860bbdd8fa12dfd73214f692 (patch)
tree6fd2481db2b98f15f5f2e9675f8511b9e3a2d932 /subx.dte
parent6efd1778e195cbadb71fbb718e182e229e5dff40 (diff)
downloadmu-b3b3237391ae9c60860bbdd8fa12dfd73214f692.tar.gz
6175 - syntax highlighting for dte
https://gitlab.com/craigbarnes/dte
Diffstat (limited to 'subx.dte')
-rw-r--r--subx.dte43
1 files changed, 43 insertions, 0 deletions
diff --git a/subx.dte b/subx.dte
new file mode 100644
index 00000000..2f969860
--- /dev/null
+++ b/subx.dte
@@ -0,0 +1,43 @@
+# Syntax highlighting for https://gitlab.com/craigbarnes/dte
+#
+# To install this file, symlink it to ~/.dte/syntax/subx
+# Then add this line to ~/.dte/rc:
+#   ft subx subx
+#
+# I don't know a better way to distribute colorization independent of color
+# theme, so you'll need to define some new colors in ~/.dte/rc. Here are the
+# colors I use, in the default colorscheme for a 256-color terminal:
+#   hi subx.comment0 25 underline
+#   hi comment 25
+#   hi subx.comment2 19
+#   hi subx.comment3 245
+
+syntax subx
+
+state start code
+    str "# . ." subx.comment3
+    str "# ." subx.comment2
+    str "# -" subx.comment0
+    char # comment
+    char '"' string
+    eat this
+
+state comment
+    char "\n" start
+    eat this
+
+state subx.comment0
+    char "\n" start
+    eat this
+
+state subx.comment2
+    char "\n" start
+    eat this
+
+state subx.comment3
+    char "\n" start
+    eat this
+
+state string
+    char "\"" start string
+    eat this