Skip to content

Commit 69cec10

Browse files
authored
hand tweaked output of generate-patterns.nu
hopefully this is good enough for a new release. still need to tweak generate-patterns.nu to make it work like this automatically.
1 parent 43c3259 commit 69cec10

File tree

1 file changed

+42
-26
lines changed

1 file changed

+42
-26
lines changed

syntaxes/nushell.tmLanguage.json

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"name": "keyword.other.u",
69-
"match": "\\b(unalias|uniq|unique|update|uppercase|upsert|url|use)\\w*"
69+
"match": "\\b(uniq|unique|update|uppercase|upsert|url|use)\\w*"
7070
},
7171
{
7272
"name": "keyword.other.t_sub",
@@ -98,11 +98,15 @@
9898
},
9999
{
100100
"name": "keyword.other.s_sub",
101-
"match": "\\bstr(\\scamel-case|\\scapitalize|\\scollect|\\scontains|\\sdowncase|\\sends-with|\\sfind-replace|\\sindex-of|\\skebab-case|\\slength|\\slpad|\\spascal-case|\\sreplace|\\sreverse|\\srpad|\\sscreaming-snake-case|\\ssnake-case|\\sstarts-with|\\ssubstring|\\stitle-case|\\sto-datetime|\\sto-decimal|\\sto-int|\\strim|\\supcase)\\w*"
101+
"match": "\\bstr(\\scamel-case|\\scapitalize|\\scollect|\\scontains|\\sdowncase|\\sends-with|\\sfind-replace|\\sindex-of|\\skebab-case|\\slength|\\slpad|\\spascal-case|\\sreplace|\\sreverse|\\srpad|\\sscreaming-snake-case|\\ssnake-case|\\sstarts-with|\\ssubstring|\\stitle-case|\\sto-datetime|\\sto-decimal|\\sto-int|\\strim|\\supcase)|sort-by|split-by\\w*"
102102
},
103103
{
104104
"name": "keyword.other.s",
105-
"match": "\\b(sample|save|schema|select|seq|set|set-with-idx|shape|shells|shift|shuffle|size|skip|sleep|slice|sort|sort-by|source|split|split-by|std|str|str-lengths|str-slice|strftime|sum|sys)\\w*"
105+
"match": "\\bset-with-idx\\w*"
106+
},
107+
{
108+
"name": "keyword.other.s",
109+
"match": "\\b(sample|save|schema|select|seq|set|shape|shells|shift|shuffle|size|skip|sleep|slice|sort|source|split|std|str|str-lengths|str-slice|strftime|sum|sys)\\w*"
106110
},
107111
{
108112
"name": "keyword.other.r_sub",
@@ -112,13 +116,17 @@
112116
"name": "keyword.other.r_sub",
113117
"match": "\\broll(\\sdown|\\sleft|\\sright|\\sup)\\w*"
114118
},
119+
{
120+
"name": "keyword.other.r",
121+
"match": "\\breplace-all\\w*"
122+
},
115123
{
116124
"name": "keyword.other.r",
117125
"match": "\\b(random|range|reduce|register|reject|rename|replace|replace-all|reverse|rm|roll|rolling|rotate|run-external)\\w*"
118126
},
119127
{
120128
"name": "keyword.other.q_sub",
121-
"match": "\\bquery(\\sjson|\\sweb|\\sxml)\\w*"
129+
"match": "\\bquery(\\sdb|\\sjson|\\sweb|\\sxml)\\w*"
122130
},
123131
{
124132
"name": "keyword.other.q",
@@ -130,7 +138,7 @@
130138
},
131139
{
132140
"name": "keyword.other.p",
133-
"match": "\\b(p|par-each|parse|path|pivot|port|post|prepend|print|ps)\\w*"
141+
"match": "\\b(p|par-each|parse|path|port|post|prepend|print|ps)\\w*"
134142
},
135143
{
136144
"name": "keyword.other.o_sub",
@@ -142,39 +150,43 @@
142150
},
143151
{
144152
"name": "keyword.other.n",
145-
"match": "\\b(n|n-unique|nth|nu-check|nu-example-1|nu-example-2|nu-example-3|nu-highlight)\\w*"
153+
"match": "\\b(n-unique|nu-check|nu-example-1|nu-example-2|nu-example-3|nu-highlight)\\w*"
154+
},
155+
{
156+
"name": "keyword.other.n",
157+
"match": "\\bn\\w*"
146158
},
147159
{
148160
"name": "keyword.other.m_sub",
149161
"match": "\\bmath(\\sabs|\\savg|\\sceil|\\seval|\\sfloor|\\smax|\\smedian|\\smin|\\smode|\\sproduct|\\sround|\\ssqrt|\\sstddev|\\ssum|\\svariance)\\w*"
150162
},
151163
{
152164
"name": "keyword.other.m",
153-
"match": "\\b(match|math|max|mean|median|melt|merge|metadata|min|mkdir|module|move|mv)\\w*"
165+
"match": "\\b(math|max|mean|median|melt|merge|metadata|min|mkdir|module|move|mv)\\w*"
154166
},
155167
{
156168
"name": "keyword.other.l",
157-
"match": "\\b(last|length|let|let-env|limit|lines|list|lit|load-env|lowercase|ls|ls-df)\\w*"
169+
"match": "\\b(ls-df)\\w*"
158170
},
159171
{
160-
"name": "keyword.other.k_sub",
161-
"match": "\\bkeep(\\suntil|\\swhile)\\w*"
172+
"name": "keyword.other.l",
173+
"match": "\\b(last|length|let|let-env|limit|lines|list|lit|load-env|lowercase|ls|ls-df)\\w*"
162174
},
163175
{
164176
"name": "keyword.other.k_sub",
165177
"match": "\\bkeybindings(\\sdefault|\\slist|\\slisten)\\w*"
166178
},
167179
{
168180
"name": "keyword.other.k",
169-
"match": "\\b(keep|keybindings|kill)\\w*"
181+
"match": "\\b(keybindings|kill)\\w*"
170182
},
171183
{
172184
"name": "keyword.other.j",
173185
"match": "\\b(join)\\w*"
174186
},
175187
{
176188
"name": "keyword.other.i_sub",
177-
"match": "\\binto(\\sbinary|\\sbool|\\sdatetime|\\sdb|\\sdecimal|\\sdf|\\sduration|\\sfilesize|\\sint|\\slazy|\\snu|\\sstring)\\w*"
189+
"match": "\\binto(\\sbinary|\\sbool|\\sdatetime|\\sdb|\\sdecimal|\\sdf|\\sduration|\\sfilesize|\\sint|\\slazy|\\snu|\\ssqlite|\\sstring)\\w*"
178190
},
179191
{
180192
"name": "keyword.other.i",
@@ -190,27 +202,31 @@
190202
},
191203
{
192204
"name": "keyword.other.g",
193-
"match": "\\b(g|get|get-day|get-hour|get-minute|get-month|get-nanosecond|get-ordinal|get-second|get-week|get-weekday|get-year|glob|grid|group|group-by|gstat)\\w*"
205+
"match": "\\b(group-by|get-day|get-hour|get-minute|get-month|get-nanosecond|get-ordinal|get-second|get-week|get-weekday|get-year)\\w*"
206+
},
207+
{
208+
"name": "keyword.other.g",
209+
"match": "\\b(g|get|glob|grid|group|group-by|gstat)\\w*"
194210
},
195211
{
196212
"name": "keyword.other.f_sub",
197-
"match": "\\bfrom(\\scsv|\\seml|\\sics|\\sini|\\sjson|\\snuon|\\sods|\\sssv|\\stoml|\\stsv|\\surl|\\svcf|\\sxlsx|\\sxml|\\syaml|\\syml)\\w*"
213+
"match": "\\bfrom(\\scsv|\\seml|\\sics|\\sini|\\sjson|\\snuon|\\sods|\\sparquet|\\sssv|\\stable|\\stoml|\\stsv|\\surl|\\svcf|\\sxlsx|\\sxml|\\syaml|\\syml)\\w*"
198214
},
199215
{
200216
"name": "keyword.other.f_sub",
201-
"match": "\\b(format)\\w*"
217+
"match": "\\bformat(\\sfilesize)\\w*"
202218
},
203219
{
204220
"name": "keyword.other.f",
205221
"match": "\\b(fetch|field|fill-na|fill-null|filter-with|find|first|flatten|fmt|fn|for|format|from)\\w*"
206222
},
207223
{
208224
"name": "keyword.other.e_sub",
209-
"match": "\\bexport(\\salias|\\sdef|\\sdef-env|\\senv|\\sextern)\\w*"
225+
"match": "\\bexport(\\salias|\\sdef|\\sdef-env|\\senv|\\sextern|\\suse)\\w*"
210226
},
211227
{
212228
"name": "keyword.other.e_sub",
213-
"match": "\\b(each|encode|error)\\w*"
229+
"match": "\\beach(\\swhile)|encode(\\sbase64|\\sshift-jis\\sutf-8\\sutf-16be)|error\\w*"
214230
},
215231
{
216232
"name": "keyword.other.e",
@@ -226,31 +242,31 @@
226242
},
227243
{
228244
"name": "keyword.other.d_sub",
229-
"match": "\\b(decode|detect)\\w*"
245+
"match": "\\bdecode(\\sbase64|\\sutf-8|\\sutf-16be\\sshift-jis)|detect\\w*"
230246
},
231247
{
232248
"name": "keyword.other.d",
233-
"match": "\\b(date|debug|decode|def|def-env|default|describe|df-not|do|drop|drop-duplicates|drop-nulls|dtypes|du|dummies)\\w*"
249+
"match": "\\b(date|debug|def|def-env|default|describe|df-not|do|drop|drop-duplicates|drop-nulls|dtypes|du|dummies)\\w*"
234250
},
235251
{
236252
"name": "keyword.other.c_sub",
237-
"match": "\\bconfig(\\senv|\\snu)\\w*"
238-
},
239-
{
240-
"name": "keyword.other.c_sub",
241-
"match": "\\bcustom-value(\\sgenerate|\\sgenerate2|\\supdate)\\w*"
253+
"match": "\\bconfig(\\senv|\\snu|\\sreset)\\w*"
242254
},
243255
{
244256
"name": "keyword.other.c",
245257
"match": "\\b(cache|cal|cd|char|clear|col|collect|columns|compact|complete|concat-str|concatenate|config|contains|count|count-null|cp|cumulative)\\w*"
246258
},
259+
{
260+
"name": "keyword.other.b_sub",
261+
"match": "\\bbits(\\sand|\\snot|\\sor|\\srol|\\sror|\\sshl|\\sshr|\\sxor)\\w*"
262+
},
247263
{
248264
"name": "keyword.other.b_sub",
249265
"match": "\\bbytes(\\sadd|\\sat|\\sbuild|\\scollect|\\sends-with|\\sindex-of|\\slength|\\sremove|\\sreplace|\\sreverse|\\sstarts-with)\\w*"
250266
},
251267
{
252268
"name": "keyword.other.b",
253-
"match": "\\b(benchmark|build-string|bytes)\\w*"
269+
"match": "\\b(benchmark|bits|build-string|bytes)\\w*"
254270
},
255271
{
256272
"name": "keyword.other.a_sub",
@@ -405,4 +421,4 @@
405421
}
406422
}
407423
}
408-
}
424+
}

0 commit comments

Comments
 (0)