Skip to content

Commit c5cc642

Browse files
authored
update language, version, changelog (#84)
1 parent 59e1c14 commit c5cc642

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,11 @@ All notable changes to the "vscode-nushell-lang" extension will be documented in
114114
- update language syntax to support new nushell 0.72 features (break, continue, return, loop, try, catch, mut, while, err>, out>, err+out>, out+err>)
115115
- 1.0.0
116116
- Thanks to Gabin Lefranc (@glcraft) for a total rewrite of the textmate grammar for nushell!!
117+
- 1.1.0
118+
- Updated syntax to match nushell 0.77.0
119+
- Added a new path to search for nu [#82](https://github.com/nushell/vscode-nushell-lang/pull/82)
120+
- Fixed `use` syntax highlighting [#79](https://github.com/nushell/vscode-nushell-lang/pull/79)
121+
- Added nu icon [#77](https://github.com/nushell/vscode-nushell-lang/pull/77)
122+
- Added additional scoop location [#75](https://github.com/nushell/vscode-nushell-lang/pull/75)
123+
124+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-nushell-lang",
33
"displayName": "vscode-nushell-lang",
44
"description": "nushell language for vscode",
5-
"version": "1.0.0",
5+
"version": "1.1.0",
66
"preview": true,
77
"license": "MIT",
88
"publisher": "TheNuProjectContributors",

syntaxes/nushell.tmLanguage.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126
"1": {
127127
"patterns": [
128128
{ "include": "#internal-variables" },
129-
{
129+
{
130130
"match": "\\$.+",
131-
"name": "variable.other.nushell"
131+
"name": "variable.other.nushell"
132132
}
133133
]
134134
}
@@ -296,11 +296,11 @@
296296
"function": {
297297
"begin": "((?:export\\s+)?def(?:-env)?)\\s+([\\w\\-]+|\"[\\w\\- ]+\")",
298298
"beginCaptures": {
299-
"0": {
299+
"0": {
300300
"patterns": [
301301
{ "include": "#define-function" },
302302
{ "include": "#define-extern" }
303-
]
303+
]
304304
}
305305
},
306306
"end": "(?<=\\})",
@@ -315,10 +315,10 @@
315315
"extern": {
316316
"begin": "((?:export\\s+)?extern)\\s+([\\w\\-]+|\"[\\w\\- ]+\")",
317317
"beginCaptures": {
318-
"0": {
318+
"0": {
319319
"patterns": [
320320
{ "include": "#define-extern" }
321-
]
321+
]
322322
}
323323
},
324324
"end": "(?<=\\])",
@@ -380,7 +380,7 @@
380380
"match": "(?<path>(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g<path>\"|'\\g<path>\\'|(?![\"'])\\g<path>)(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+'|\\*))?\\s*;?$",
381381
"captures": {
382382
"2": { "name": "entity.name.function.nushell" },
383-
"3": {
383+
"3": {
384384
"name": "string.bare.nushell",
385385
"patterns": [
386386
{
@@ -398,7 +398,7 @@
398398
"begin": "(?<path>(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g<path>\"|'\\g<path>\\'|(?![\"'])\\g<path>)\\s+\\[",
399399
"beginCaptures": {
400400
"2": { "name": "entity.name.function.nushell" },
401-
"3": {
401+
"3": {
402402
"name": "string.bare.nushell",
403403
"patterns": [
404404
{
@@ -470,7 +470,7 @@
470470
"begin": "(\\{)(?:\\s*\\|([\\w, ]*)\\|)?",
471471
"beginCaptures": {
472472
"1": { "name": "punctuation.section.block.begin.bracket.curly.nushell" },
473-
"2": {
473+
"2": {
474474
"patterns": [
475475
{ "include": "#function-parameter" },
476476
{
@@ -486,10 +486,10 @@
486486
},
487487
"name": "meta.expression.braced.nushell",
488488
"patterns": [
489-
{
489+
{
490490
"begin": "((?:(?:[^$\\(\\{\\[\"'#\\s][^\\(\\{\\[\"'#\\s]*)|\\$?(?:\"[^\"]+\"|'[^']+')))\\s*(:)\\s*",
491491
"beginCaptures": {
492-
"1": {
492+
"1": {
493493
"name": "variable.other.nushell",
494494
"patterns": [
495495
{ "include": "#paren-expression" }
@@ -511,10 +511,10 @@
511511
"captures": {
512512
"1": { "name": "keyword.other.nushell" },
513513
"2": { "name": "variable.other.nushell" },
514-
"3": {
514+
"3": {
515515
"patterns": [
516516
{ "include": "#operators" }
517-
]
517+
]
518518
}
519519
}
520520
},
@@ -523,21 +523,21 @@
523523
"captures": {
524524
"1": { "name": "entity.name.function.nushell" },
525525
"2": { "name": "entity.name.type.nushell" },
526-
"3": {
526+
"3": {
527527
"patterns": [
528528
{ "include": "#operators" }
529-
]
529+
]
530530
}
531531
}
532532
},
533533
"pre-command": {
534534
"begin": "(\\w+)(=)",
535535
"beginCaptures": {
536536
"1": { "name": "variable.other.nushell" },
537-
"2": {
537+
"2": {
538538
"patterns": [
539539
{ "include": "#operators" }
540-
]
540+
]
541541
}
542542
},
543543
"end": "(?=\\s+)",
@@ -550,7 +550,7 @@
550550
"begin": "(?<!\\w)(?:(\\^)|(?![0-9]|(?<=\\)|\\}|\\]|\\$\\w+)\\.))([\\w.!]+(?:(?: (?!-)[\\w\\-.!]+(?:(?= |\\))|$)|[\\w\\-.!]+))*|(?<=\\^)\\$?(?:\"[^\"]+\"|'[^']+'))",
551551
"beginCaptures": {
552552
"1": { "name": "keyword.operator.nushell" },
553-
"2": {
553+
"2": {
554554
"patterns": [
555555
{ "include": "#control-keywords" },
556556
{
@@ -559,34 +559,34 @@
559559
"0": { "name": "keyword.other.builtin.nushell" }
560560
}
561561
},
562-
{
562+
{
563563
"comment": "Regex generated with list-to-tree (https://github.com/glcraft/list-to-tree)",
564-
"match": "(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|strip))?|y)|ppend|st)|b(?:enchmark|its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|starts-with))?)|c(?:al|d|har|lear|o(?:l(?:lect|umns)|m(?:mandline|p(?:act|lete))|nfig(?: (?:env|nu|reset))?)|p|ustom-value (?:generate(?:2)?|update))|d(?:ate(?: (?:format|humanize|list-timezone|now|to-(?:record|t(?:able|imezone))))?|e(?:bug|code(?: base64)?|f(?:-env|ault)?|scribe|tect columns)|o|rop(?: (?:column|nth))?|u)|e(?:ach(?: while)?|cho|n(?:code(?: base64)?|ter|v)|rror make|very|x(?:it|port(?: (?:alias|def(?:-env)?|extern|use)|-env)?|tern ))|f(?:etch|i(?:nd|rst)|latten|mt|ormat(?: filesize)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|nuon|ods|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:et|lob|r(?:id|oup(?:-by)?)|stat)?|h(?:ash(?: (?:base64|md5|sha256))?|e(?:aders|lp(?: operators)?)|i(?:de(?:-env)?|sto(?:gram|ry(?: session)?)))|i(?:gnore|n(?:c|put|sert|to(?: (?:b(?:inary|ool)|d(?:atetime|ecimal|uration)|filesize|int|record|s(?:qlite|tring)))?)|s-(?:admin|empty))|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|oad-env|s)|m(?:ath(?: (?:a(?:bs|vg)|ceil|eval|floor|m(?:ax|edian|in|ode)|product|round|s(?:qrt|tddev|um)|variance))?|e(?:rge|tadata)|kdir|o(?:dule|ve)|ut|v)|n(?:u-(?:check|example-(?:1|2|3)|highlight))?|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|split|type))?)|o(?:rt|st)|r(?:epend|int)|s)?|query(?: (?:db|json|web|xml))?|r(?:an(?:dom(?: (?:bool|chars|d(?:ecimal|ice)|integer|uuid))?|ge)|e(?:duce|gist(?:er|ry query)|ject|name|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-external)|s(?:ave|chema|e(?:lect|q(?: (?:char|date))?)|h(?:ells|uffle)|ize|kip(?: (?:until|while))?|leep|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:hars|olumn)|list|row|words)|-by)?|tr(?: (?:c(?:a(?:mel-case|pitalize)|o(?:llect|ntains))|d(?:istance|owncase)|ends-with|find-replace|index-of|join|kebab-case|l(?:ength|pad)|pascal-case|r(?:e(?:place|verse)|pad)|s(?:creaming-snake-case|nake-case|tarts-with|ubstring)|t(?:itle-case|o-(?:d(?:atetime|ecimal)|int)|rim)|upcase))?|ys)|t(?:a(?:ble|ke(?: (?:until|while))?)|erm size|o(?: (?:csv|html|json|md|nuon|t(?:ext|oml|sv)|url|xml|yaml)|uch)?|ranspose|utor)|u(?:niq|p(?:date(?: cells)?|sert)|rl(?: parse)?|se)|v(?:ersion|iew-source)|w(?:atch|h(?:ere|ich)|i(?:ndow|th-env)|rap)|zip)(?![\\w-])( (.*))?",
564+
"match": "(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st)|b(?:its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|starts-with))?)|c(?:al|d|har|lear|o(?:l(?:lect|umns)|m(?:mandline|p(?:act|lete))|n(?:fig(?: (?:env|nu|reset))?|st|tinue))|p|ustom-value (?:generate(?:2)?|update))|d(?:ate(?: (?:format|humanize|list-timezone|now|to-(?:record|t(?:able|imezone))))?|e(?:bug|code(?: base64)?|f(?:-env|ault)?|scribe|tect columns)|fr (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:ache|o(?:l(?:lect|umns)?|n(?:cat(?:-str|enate)|tains)|unt(?:-null)?)|umulative)|d(?:rop(?:-(?:duplicates|nulls))?|types|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|i(?:nto-(?:df|lazy|nu)|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join|l(?:ast|i(?:st|t)|owercase|s)|m(?:ax|e(?:an|dian|lt)|in)|n(?:-unique|ot)|o(?:pen|therwise)|qu(?:antile|ery)|r(?:e(?:name|place(?:-all)?|verse)|olling)|s(?:ample|e(?:lect|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|r(?:-(?:lengths|slice)|ftime))|um(?:mary)?)|t(?:ake|o-(?:arrow|csv|parquet))|u(?:nique|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column))|o|rop(?: (?:column|nth))?|u)|e(?:ach(?: while)?|cho|n(?:code(?: base64)?|ter|umerate)|rror make|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|def(?:-env)?|extern|old-alias|use)|-env)?)|tern))|f(?:i(?:l(?:l|ter)|nd|rst)|latten|mt|or(?:mat(?: filesize)?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|nuon|ods|p(?:arquet|list)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:et|lob|r(?:id|oup(?:-by)?)|stat)?|h(?:ash(?: (?:base64|md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|modules|operators))?)|i(?:de(?:-env)?|st(?:o(?:gram|ry(?: session)?))?)|ttp(?: (?:delete|get|head|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put|s(?:ert|pect)|to(?: (?:b(?:inary|ool)|d(?:atetime|ecimal|uration)|filesize|int|record|s(?:qlite|tring)))?)|s-(?:admin|empty))|json path|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:ath(?: (?:a(?:bs|rc(?:cos(?:h)?|sin(?:h)?|tan(?:h)?)|vg)|c(?:eil|os(?:h)?)|e(?:val)?|floor|l(?:n|og)|m(?:ax|edian|in|ode)|p(?:i|roduct)|round|s(?:in(?:h)?|qrt|tddev|um)|ta(?:n(?:h)?|u)|variance))?|e(?:rge|tadata)|kdir|o(?:dule|ve)|ut|v)|n(?:u-(?:check|example-(?:1|2|3)|highlight))?|o(?:ld-alias|pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|split|type))?)|eriodic-table|lot|net|ort|r(?:epend|int|ofile)|s)?|query(?: (?:db|json|web|xml))?|r(?:an(?:dom(?: (?:bool|chars|d(?:ecimal|ice)|integer|uuid))?|ge)|e(?:duce|g(?:ex|ist(?:er|ry query))|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-external)|s(?:ave|chema|e(?:lect|q(?: (?:char|date))?)|h(?:ells|uffle)|ize|kip(?: (?:until|while))?|leep|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:hars|olumn)|list|row|words)|-by)?|t(?:art|r(?: (?:c(?:a(?:mel-case|pitalize)|o(?:llect|ntains))|d(?:istance|owncase)|ends-with|find-replace|index-of|join|kebab-case|l(?:ength|pad)|pascal-case|r(?:e(?:place|verse)|pad)|s(?:creaming-snake-case|nake-case|tarts-with|ubstring)|t(?:itle-case|o-(?:d(?:atetime|ecimal)|int)|rim)|upcase))?)|ys)|t(?:a(?:ble|ke(?: (?:until|while))?)|erm size|imeit|o(?: (?:csv|html|json|md|nuon|t(?:ext|oml|sv)|xml|yaml)|uch)?|r(?:anspose|y)|utor)|u(?:niq(?:-by)?|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|encode|join|parse))?|se)|v(?:alues|ersion|iew(?: (?:files|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le))|i(?:ndow|th-env)|rap)|xyplot|zip)(?![\\w-])( (.*))?",
565565
"captures": {
566566
"1": { "name": "keyword.other.builtin.nushell" },
567-
"2": {
567+
"2": {
568568
"patterns": [
569569
{ "include": "#value" }
570570
]
571571
}
572572
}
573573
},
574-
{
574+
{
575575
"match": "(?<=\\^)(?:\\$(\"[^\"]+\"|'[^']+')|\"[^\"]+\"|'[^']+')",
576576
"name": "entity.name.type.external.nushell",
577577
"captures": {
578-
"1": {
578+
"1": {
579579
"patterns": [
580580
{ "include": "#paren-expression" }
581-
]
581+
]
582582
}
583583
}
584584
},
585585
{
586586
"match": "([\\w.]+(?:-[\\w.!]+)*)(?: (.*))?",
587587
"captures": {
588588
"1": { "name": "entity.name.type.external.nushell" },
589-
"2": {
589+
"2": {
590590
"patterns": [
591591
{ "include": "#value" }
592592
]
@@ -595,7 +595,7 @@
595595
},
596596
{ "include": "#value" }
597597
]
598-
598+
599599
}
600600
},
601601
"end": "(?=\\||\\)|\\}|;)|$",

0 commit comments

Comments
 (0)