forked from atom/language-ruby
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathlanguage-crystal.cson
124 lines (124 loc) · 3.2 KB
/
language-crystal.cson
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
'.source.crystal':
editor:
'commentStart': '# '
'increaseIndentPattern': '(?x)^\n (\\s*\n (module|class|struct|((private|protected)\\s+)?(def|macro)\n |unless|if|else|elsif\n|case|when\n |begin|rescue|ensure\n |for|while|until\n |(?= .*? \\b(do|begin|case|if|unless)\\b )\n # the look-ahead above is to quickly discard non-candidates\n ( "(\\\\.|[^\\\\"])*+" # eat a double quoted string\n | \'(\\\\.|[^\\\\\'])*+\' # eat a single quoted string\n | [^#"\'] # eat all but comments and strings\n )*\n ( \\s (do|begin|case)\n | [-+=&|*/~%^<>~](?<!\\$.) \\s*+ (if|unless)\n )\n )\\b\n (?! [^;]*+ ; .*? \\bend\\b )\n |( "(\\\\.|[^\\\\"])*+" # eat a double quoted string\n | \'(\\\\.|[^\\\\\'])*+\' # eat a single quoted string\n | [^#"\'] # eat all but comments and strings\n )*\n ( \\{ (?! [^}]*+ \\} )\n | \\[ (?! [^\\]]*+ \\] )\n )\n ).*$'
'decreaseIndentPattern': '^\\s*([}\\]](,?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)'
autocomplete:
symbols:
class:
selector: '.class.name, .inherited-class, .instance.type'
typePriority: 4
function:
selector: '.function.name'
typePriority: 3
variable:
selector: '.variable'
typePriority: 2
'': # the catch-all
selector: '.source'
typePriority: 1
'.source.crystal .meta.class':
autocomplete:
symbols:
builtin:
suggestions: [
{
type: 'class'
text: 'Array'
}
{
type: 'class'
text: 'Bool'
}
{
type: 'class'
text: 'Char'
}
{
type: 'class'
text: 'Class'
}
{
type: 'class'
text: 'Enum'
}
{
type: 'class'
text: 'Enumerable'
}
{
type: 'class'
text: 'Float'
}
{
type: 'class'
text: 'Float32'
}
{
type: 'class'
text: 'Float64'
}
{
type: 'class'
text: 'Int'
}
{
type: 'class'
text: 'Int32'
}
{
type: 'class'
text: 'Int64'
}
{
type: 'class'
text: 'JSON'
}
{
type: 'class'
text: 'Nil'
}
{
type: 'class'
text: 'Object'
}
{
type: 'class'
text: 'Proc'
}
{
type: 'class'
text: 'Range'
}
{
type: 'class'
text: 'Regex'
}
{
type: 'class'
text: 'Set'
}
{
type: 'class'
text: 'String'
}
{
type: 'class'
text: 'Struct'
}
{
type: 'class'
text: 'Symbol'
}
{
type: 'class'
text: 'Time'
}
{
type: 'class'
text: 'Tuple'
}
]
'.source.crystal:not(.string.unquoted.heredoc)':
'editor':
'foldEndPattern': '(?x)\n\t\t( (^|;) \\s*+ end \\s*+ ([#].*)? $\n\t\t| (^|;) \\s*+ end \\. .* $\n\t\t| ^ \\s*+ [}\\]] ,? \\s*+ ([#].*)? $\n\t\t| [#] .*? \\(end\\) \\s*+ $ # Sune’s special marker\n\t\t| ^=end\n\t\t)\n\t'