forked from GodotID/nano-gdscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdscript.nanorc
81 lines (66 loc) · 1.93 KB
/
gdscript.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# GNU Nano Syntax Highlighter for GDScript (*.gd)
# Contributors, please read CONTRIBUTING.md
# otherwise your pull request would be closed
syntax gdscript "\.gd$"
formatter gdformat
linter gdlint
comment "#"
# Numbers.
color orange "\<[0-9]*\>"
color orange "\<0x[0-9a-fA-F]*\>"
# Operators.
color white "(\!|\%|\&|\*|\(|\)|\-|\+|\=|\{|\}|\[|\]|\/)"
# Class.
color lightcyan "\<[A-Z]+[_a-zA-Z0-9]*\>"
## Class Property.
color white "\.[_a-zA-Z]+[0-9]*"
# Function Calls.
color lightblue "[_a-zA-Z]*[0-9]*\("
# Constructors.
color lightcyan "[A-Z][_a-zA-Z]*[0-9]*\("
color lightblue "\(|\)"
# Constants.
color white "\<[A-Z_]+\>"
# Keywords.
## Conditions
color bold,lightred "\<(if|elif|else|match|switch|case|when)\>"
## Repeations.
color bold,lightred "\<(for|while|break|continue)\>"
## Long-hand Operator
color bold,lightred "\<(is|as|not|in|and|or)\>"
## OOP.
color bold,lightred "\<(null|self|owner|parent|tool)\>"
## Booleans.
color red "\<(true|false)\>"
## Statements.
color bold,lightred "\<(remote|master|puppet|remotesync|mastersync|puppetsync|sync)\>"
color bold,lightred "\<(return|pass|static|const|enum|breakpoint|assert|onready)\>"
color bold,lightred "\<(class_name|extends|var|export|setget|class|func|signal)\>"
## Primitive Types.
color bold,lightgreen "\<(void|bool|int|float)\>"
# Anotations.
color yellow "@[_a-z]*"
# Strings.
## "
color brightyellow ""([^"]|\\")*""
color brightyellow start="\"\"\"" end="\"\"\""
## '
color brightyellow "'([^']|\\')*'"
# Escape sequences.
color cyan "\\([abcefnrtv'"\])"
# Node paths.
color green "(\$|%)"[_/a-zA-Z0-9][_/ a-zA-Z0-9]+?""
color green "(\$|%)[_/a-zA-Z0-9][_/a-zA-Z0-9]+?"
# Comments.
color lightblack "^#.*"
# Inline comments.
color lightblack "\s\s#\s.*"
# Docstrings.
color white "^##.*"
# Inline docstrings.
color white "\s\s##\s.*"
# Misc.
## Task Markers.
color bold,lightcyan "^\s*#\s*(TODO|FIX|HACK|XXX|NOTE|BUG)"
## Notices.
color bold,lightyellow "^\s*#\s*(WARNING|WARN|BUGGY)"