Skip to content

Instantly share code, notes, and snippets.

@abenson
Created October 29, 2024 18:59
Show Gist options
  • Save abenson/b0de3d01655d230bcf2fbd6807173a3a to your computer and use it in GitHub Desktop.
Save abenson/b0de3d01655d230bcf2fbd6807173a3a to your computer and use it in GitHub Desktop.
typst.nanorc
syntax "typst" "\.typ(st)?"
comment "/*|*/"
# Markup
## Strong
color bold,normal "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
## Emphasis
color italic,normal "(^|[[:space:]])(_[^ ][^_]*_|_[^ ][^*]*_)"
## Label
color lightblue "<\w+>"
## Reference
color lightblue "\b@\w+"
## Headings
color bold,yellow "^=.+"
## Numbered/Bullet List
color lightblue "^\s*[-+] "
## Expression
color lightblue "#\w+"
## Term/Definition
color bold,normal "/ .*:"
## Link
color blue "http(s)?://[-A-Za-z0-9._~:/?#@!$&'()%=]+"
## CharEscape
color grey "\#\w+"
## Raw Text
color grey start="`{1,3}" end="`{1,3}"
## Comments
color green "([ ]|^)//.*"
color green start="/\*" end="\*/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment