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.
This commit is contained in:
Benno Schulenberg 2019-11-04 20:52:35 +02:00
parent ebeed9c013
commit 302ea79d1c
5 changed files with 10 additions and 5 deletions

View File

@ -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)\>"

View File

@ -5,9 +5,10 @@
syntax lua "\.lua$"
magic "Lua script"
linter "luacheck --no-color"
comment "--"
linter luacheck --no-color
color brightwhite "\[\[.*\]\]"
# Operators

View File

@ -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.

View File

@ -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_-]+\(\)"

View File

@ -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 "(^|[^\])%.*"