Files
nano-with-linefolding/syntax/guile.nanorc
Benno Schulenberg 49be1275e6 syntax: guile: colorize more syntax words and procedure names
Also, colorize more quoted symbols and booleans, make the green for
syntax words and the blue for keywords lighter, and show comments
in grey italics.  Also, don't miscolorize some empty strings as if
they were the start of a multiline string.

This addresses most of https://savannah.gnu.org/patch/?10558.
2026-02-21 16:41:33 +01:00

31 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Syntax highlighting for Guile Scheme.
## Original authors: Mark Oteiza and Benno Schulenberg
## License: GPL version 3 or newer
syntax guile "\.(scm|sld|sls|ss)$"
header "^#!.*guile"
comment ";"
# Basic syntax
color lightgreen "\<((and|begin|case|cond|do|else|if|lambda|let(rec)?|or|quote|unless|when)\>|let\*|set!)"
# Basic procedures
color lightcyan "\<((append|apply|c[ad]{1,4}r|cons|display|for-each|list|map|newline)\>|reverse(\>|!)|set-c[ad]r!)"
color lightcyan "\<(boolean|char(-ci)?[<>]?=?|complex|eqv?|even|integer|list|nan|negative|null|number|odd|pair|positive|rational|real|string|symbol|vector|zero)\?"
color lightcyan "\<(abs|a?(cos|sin|tan)|ceiling|exp|floor|max|min|modulo|not|random|round|quotient|sqrt|square|truncate)\>"
# Defining things
color brightgreen "\<define(-macro|-module|-public|-syntax)?\>"
# Quoted symbols
color lightyellow "'(\w|[!$%&*+/:<=>?@^_~])(\w|[!$%&*+/:<=>?@^_~.0-9-])*"
# Characters
color brightmagenta "#\\(.|\w+)"
# Booleans
color brightred "#(t|true|f|false)\>"
# Keywords
color lagoon "#?:(\w|[?-])+"
# Strings
color yellow start="^[[:blank:]]*"([^"\]|\\.)*$" end="(^|[^\]|[^\]\\\\)""
color yellow ""([^"\]|\\.)*""
# Comments
color italic,#aaa "(^|[[:blank:]]);.*"