commit 302ea79d1cea43720c008d4d8c217baa78b3bc00
parent ebeed9c013e4b1606657e4507c9c4a18b4d90ffe
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 4 Nov 2019 20:52:35 +0200
syntaxes: put the 'linter' and 'formatter' commands on a separate line
To show that they are a different class of thing than the file-matching
regexes and the comment thing, which all kind of "describe" the file.
Diffstat:
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/syntax/go.nanorc b/syntax/go.nanorc
@@ -1,9 +1,10 @@
## Here is an example for Go.
syntax go "\.go$"
-formatter gofmt -w
comment "//"
+formatter gofmt -w
+
# Types.
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>"
color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>"
diff --git a/syntax/lua.nanorc b/syntax/lua.nanorc
@@ -5,9 +5,10 @@
syntax lua "\.lua$"
magic "Lua script"
-linter "luacheck --no-color"
comment "--"
+linter luacheck --no-color
+
color brightwhite "\[\[.*\]\]"
# Operators
diff --git a/syntax/python.nanorc b/syntax/python.nanorc
@@ -3,9 +3,10 @@
syntax python "\.py$"
header "^#!.*python"
magic "Python script"
-linter pyflakes
comment "#"
+linter pyflakes
+
# Function definitions.
color brightblue "def [0-9A-Za-z_]+"
# Keywords.
diff --git a/syntax/sh.nanorc b/syntax/sh.nanorc
@@ -3,9 +3,10 @@
syntax sh "(\.sh|\.(a|ba|c|da|k|mk|pdk|tc|z)(sh|shrc|sh_profile)|/(etc/|\.)profile)$"
header "^#!.*/(((a|ba|c|da|k|mk|pdk|tc|z)?sh)|(busybox|env) +sh|openrc-run|runscript)"
magic "(POSIX|Bourne-Again) shell script.*text"
-linter dash -n
comment "#"
+linter dash -n
+
# Function declarations.
color brightgreen "^[A-Za-z0-9_-]+\(\)"
diff --git a/syntax/tex.nanorc b/syntax/tex.nanorc
@@ -2,9 +2,10 @@
syntax tex "\.tex$"
magic "(La)?TeX document"
-linter chktex -v0 -q -I
comment "%"
+linter chktex -v0 -q -I
+
color green "\\.|\\[A-Za-z]*"
color magenta "[{}]"
color blue "(^|[^\])%.*"