commit 8749ccb469386e82d55b05ec93714b3acd0e9b5b
parent b5c5cde0d4be510d14ec41016b12c980bdcdc073
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 11 Oct 2019 19:47:46 +0200
syntax: nanorc: colorize the 'fixer' command as valid
Also add a default formatting command to the Go syntax.
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/syntax/go.nanorc b/syntax/go.nanorc
@@ -1,6 +1,7 @@
## Here is an example for Go.
syntax go "\.go$"
+fixer gofmt -w
comment "//"
# Types.
diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc
@@ -4,7 +4,7 @@ syntax nanorc "\.?nanorc$"
comment "#"
# Possible errors and parameters
-icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|tabgives|i?color|extendsyntax).*"
+icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|fixer|linter|tabgives|i?color|extendsyntax).*"
# Keywords
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|breaklonglines|casesensitive|constantshow|cutfromcursor|emptyline|finalnewline|historylog|jumpyscrolling|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabstospaces|tempfile|trimblanks|unix|view|wordbounds|zap)\>"
@@ -13,9 +13,9 @@ icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|errorcolor|f
icolor brightgreen "^[[:space:]]*set[[:space:]]+(fill[[:space:]]+-?[[:digit:]]+|(guidestripe|tabsize)[[:space:]]+[1-9][0-9]*)\>"
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-9]|2[0-4])|Ins|Del)[[:space:]]+([[:alpha:]]+|".*")[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-9]|2[0-4])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
-icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter|tabgives)[[:space:]]+.*"
-icolor brightgreen "^[[:space:]]*(syntax|linter)[[:space:]]+[^[:blank:]]+"
-icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|tabgives|extendsyntax)\>"
+icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|fixer|linter|tabgives)[[:space:]]+.*"
+icolor brightgreen "^[[:space:]]*(syntax|fixer|linter)[[:space:]]+[^[:blank:]]+"
+icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|fixer|linter|tabgives|extendsyntax)\>"
# Strings
color brightmagenta "([[:space:]]|(start|end)=)".+"([[:space:]]|$)"