mirror of
https://github.com/scopatz/nanorc
synced 2024-11-27 12:25:53 +01:00
Added initial Cython highlighting.
This commit is contained in:
parent
15674e52cb
commit
436525c343
28
cython.nanorc
Normal file
28
cython.nanorc
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
## Cython nanorc, based off of Python nanorc.
|
||||||
|
##
|
||||||
|
syntax "python" "\.pyx$" "\.pyd$" "\.pyi$"
|
||||||
|
icolor brightred "def [0-9A-Z_]+"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Python Keyword Color
|
||||||
|
color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with)\>"
|
||||||
|
color brightmagenta "\<(continue|break|return)\>"
|
||||||
|
|
||||||
|
# Cython Keyword Color
|
||||||
|
color green "\<(cdef|extern|namespace)\>"
|
||||||
|
color red "\<(bint|double|int)\>"
|
||||||
|
|
||||||
|
#Operator Color
|
||||||
|
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
|
||||||
|
|
||||||
|
#Parenthetical Color
|
||||||
|
color magenta "[(){}]" "\[" "\]"
|
||||||
|
|
||||||
|
#String Color
|
||||||
|
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
|
||||||
|
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
|
||||||
|
color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
|
||||||
|
|
||||||
|
#Comment Color
|
||||||
|
color brightblue "#.*$"
|
Loading…
Reference in New Issue
Block a user