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. ## Here is an example for Go.
syntax go "\.go$" syntax go "\.go$"
formatter gofmt -w
comment "//" comment "//"
formatter gofmt -w
# Types. # Types.
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>" 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)\>" color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>"

View File

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

View File

@ -3,9 +3,10 @@
syntax python "\.py$" syntax python "\.py$"
header "^#!.*python" header "^#!.*python"
magic "Python script" magic "Python script"
linter pyflakes
comment "#" comment "#"
linter pyflakes
# Function definitions. # Function definitions.
color brightblue "def [0-9A-Za-z_]+" color brightblue "def [0-9A-Za-z_]+"
# Keywords. # 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)$" 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)" header "^#!.*/(((a|ba|c|da|k|mk|pdk|tc|z)?sh)|(busybox|env) +sh|openrc-run|runscript)"
magic "(POSIX|Bourne-Again) shell script.*text" magic "(POSIX|Bourne-Again) shell script.*text"
linter dash -n
comment "#" comment "#"
linter dash -n
# Function declarations. # Function declarations.
color brightgreen "^[A-Za-z0-9_-]+\(\)" color brightgreen "^[A-Za-z0-9_-]+\(\)"

View File

@ -2,9 +2,10 @@
syntax tex "\.tex$" syntax tex "\.tex$"
magic "(La)?TeX document" magic "(La)?TeX document"
linter chktex -v0 -q -I
comment "%" comment "%"
linter chktex -v0 -q -I
color green "\\.|\\[A-Za-z]*" color green "\\.|\\[A-Za-z]*"
color magenta "[{}]" color magenta "[{}]"
color blue "(^|[^\])%.*" color blue "(^|[^\])%.*"