Skip to content

Commit 1f19047

Browse files
author
sam
committed
feat(nanorc): solidity
Signed-off-by: sam <sam@freighttrust.com>
1 parent f49b612 commit 1f19047

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

solidity.nanorc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#
2+
#
3+
#
4+
5+
#
6+
header "^pragma solidity [\^\~\>\<]?=?[0-9\.]*;"
7+
8+
color green "\<
9+
color green "\<
10+
11+
# elementaryTypeName
12+
color yellow "\<(address|bool|string|var|Int|Uint|byte|Byte|Fixed|Ufixed)\>"
13+
14+
# ReservedKeyword
15+
color purple "\<(abstract|after|case|catch|default|final|in|inline|let|match|null|of|relocatable|static|switch|try|typeof|abstract|override)\>"
16+
17+
## String
18+
color brightyellow "L?\"(\\"|[^"])*\""
19+
color brightyellow "L?'(\'|[^'])*'"
20+
21+
#color brightwhite,blue start="\$\{" end="\}"
22+
23+
# primitiveType
24+
color brightcyan "\\b(address|string\\d*|bytes\\d*|int\\d*|uint\\d*|bool|hash\\d*|var)\\b"
25+
26+
# struct
27+
color pink "\\b(struct)(\\s+([A-Za-z_]\\w*))?\\b"
28+
29+
30+
## Trailing spaces
31+
color ,green "[[:space:]]+$"
32+
33+
34+
## Highlighting regular comments
35+
color brightblue "//.*"
36+
color brightblue start="/\*" end="\*/"
37+
38+
39+
# Highlighting for natspec comments
40+
color magenta "@param [a-zA-Z_][a-z0-9A-Z_]+"
41+
color magenta "@return"
42+
color magenta "@notice"
43+
color magenta "@dev"
44+
color magenta "@dev"
45+
color magenta "@inheritdoc"
46+
color magenta "@author"
47+
color magenta "@title"
48+
color magenta "@custom"

0 commit comments

Comments
 (0)