Re: syntax coloring for Oz and CQL and Docker files

Benno Schulenberg <[email protected]> Sun, 19 Oct 2025 10:31:28 +0200
Newsgroups gmane.editors.nano.devel
Message-ID <[email protected]>
** Do not reply to me.  Answer only to the list. **

Op 18-10-2025 om 20:26 schreef Mattéo Dubuisson:
> I really appreciate for your time. I did the first nanorc file for Mozart2 
> programing system. It's a research language very used for paradigms courses in 
> my University.
> 
> Maybe in the future I'll find issues or missing things so I wanted to ask how 
> should I process to update it at this moment ? Contact the staff by email or 
> something else ?

There will be no further responses from me, as it seems you cannot fully read
and process an email.

> I have seen there is no extension for docker files. I use a lot nano to config 
> my dockerfiles on my server without GUI so I would really add it but before I 
> need to know if it's ok for you ? It'll force me to review docker files in 
> details and learn new commands on it so that would be a good exercise for me. I 
> have seen that coloration is a way to debug as it's done in ~/.nanorc when the 
> command is invalid the text becomes red so maybe doing it with dockerfile also ?

To save yourself some work, Scopatz already has a syntax for Docker files:

   https://github.com/scopatz/nanorc/blob/master/Dockerfile.nanorc


Benno
oz.nanorc (text/plain, 1.9 KB)
## Syntax to highlighting for Mozart2 programing system
## See http://mozart2.org/

## Original author: Mattéo Dubuisson
## Author company : Université catholique de Louvain La Neuve
## Year : 2025
## License: Public domain

syntax oz "\.oz$"
magic "OZ source code"
comment "%"

# Keywords (http://mozart2.org/mozart-v1/doc-1.4.0/notation/node2.html#chapter.lexical)
color brightmagenta "andthen|at|attr|case|catch|choice|cond|declare|define|dis|div|else|elseclause|elseif|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|mod|not|of|or|orelse|prepare|proc|prop|raise|require|self|skip|suchthat|then|thread|true|try|unit"

# Delimiters
color white "\(|\)|\[|\]|\{|\}|\||\#|\:|\.\.\.|\=|\.|\:\=|\^|\[\]|\$|\!|\_|\~|\+|\-|\*|\/|\@|<\-|\,|\!\!|<\=|\=\=|\\\=|<|\=<|>|>\=|\=\:|\\\=\:|<\:|\=<\:|>\:|>\=\:|\:\:|\:\:\:"

# Operators

# Label
color white "[A-Z][A-Za-z0-9]*"

# Value
color white "=[[:space:]]*[A-Za-z0-9]+"

# Number
color yellow "[[:space:]][0-9]+"
color yellow "[0-9]+[[:space:]]"

# Procedure / Function / Method / Call
color white "\{[[A-Za-z0-9[:space:].]+\}"
color brightcyan "\{[[:space:]]*[^[:space:]}]+"
color brightblue "\{[[:space:]]*[^[:space:]}.]+"
color brightmagenta "\{|\}"

# Class
color brightgreen "(class|from)[[:space:]]*[A-Za-z0-9]+"
color brightmagenta "class|from"

# Directive (http://mozart2.org/mozart-v1/doc-1.4.0/compiler/node2.html)
color brightgreen "\\(switch|pushSwitches|popSwitches|localSwitches|line|insert|define|undef|ifdef|ifndef|else|endif)"

# Record
color cyan "[a-z][A-Za-z0-9]*\("
color white "\("

# Record key
color yellow "[A-Za-z0-9]*:"
color white ":"

# Record value
color cyan "\.[A-Za-z0-9]+"
color yellow "\.[0-9]+"
color white "\."

# String
color yellow "`([^`]|\\`)*`"
color brightyellow "'([^']|\\')*'"
color brightyellow ""([^"]|\\")*""

# Comments
color orange "%[^"]*$|(^|[[:blank:]])%.*"
color orange start="/\*" end="\*/"
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAmj0oeAFAwAAAAAACgkQUUu+Lrjhlh+b
7RAA7e8mH7VrEEInomTtdsv8eWNRi27qL2d7hpZHT5PdX5WC4m4BMw5Eo27rOoBnLFuate9MIyIE
T9JI82uxaI4ZZ+BDbd4gikmQWn53KbwOjd1XBTQPXWLWKjmnOn8BLnFFA9pzIqIO74JVyzaDgGEZ
njTz6C6hzm378UwxTg875nIgOjbxEwMXypIPl/CLpQrnFT5UpMl1nk50Qzi1tj2AV6ahuYQXbh6P
+HR566hIw1AW+uRYED0jlTfgQXr9SX7l81aeYb8MUEL8Qe1112mvfQFQ/JJAcLTWp4ebs0xlHV65
Otb3kWv0xWzf3MioikO1YYWQTtvSY3H//WYOU1r8Vinvnh4Z/WloZ5vShft2OArJ5sxeHwMK6Nga
Thods/B4aN3XV7VEzLloqtWp+8X8K2JsYf/ll0rELRR8eGIKN+WXLeeJw3G1cO1teVqIbLQuAPLf
7eNQ6HuEgCYgSph+RblLyOasw1b9OXQZeATgP4HoqnhFk/VI4pn0wnrxghplSA7CuwokN1qP9xx+
vwPDOto0YbWZ8KiS0yCd2advHOifnpXARlGzhsAS/jBnKghVAGMBDTdqoH4vWkvwcjnyBLXCUyCI
0hF9J3NCVZM0J8Im6pvKl/PCcBmgKYaHkVED3/On3MHiz/isPuCFUNvIHJLpSK2nwmIXwjM9Wp5e
L2s=
=TEpJ
-----END PGP SIGNATURE-----