Skip to content

Commit c664957

Browse files
authored
Merge pull request #51 from fdncred/update_keywords
update keywords and indentation rules
2 parents 613593c + 1369f36 commit c664957

File tree

4 files changed

+18
-37
lines changed

4 files changed

+18
-37
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,6 @@ All notable changes to the "vscode-nushell-lang" extension will be documented in
8686
- update screenshots showing else keyword
8787
- add `on-Enter` rules
8888
- fixed a bug with variable syntax coloring
89+
- 0.5.2
90+
- add `true`, `false`, and `null` as pseudo keywords
91+
- changed the indentation rules

language-configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
},
3939
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
4040
"indentationRules": {
41-
"increaseIndentPattern": "^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$",
42-
"decreaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"
41+
"increaseIndentPattern": "{{?(def|def-env|else|extern|for|if|let|let-env|with-env)\\b.*}}?",
42+
"decreaseIndentPattern": "{{?/(def|def-env|for|if)\\b}}?"
4343
},
4444
"onEnterRules": [
4545
{

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": "0.5.1",
5+
"version": "0.5.2",
66
"preview": true,
77
"license": "MIT",
88
"publisher": "TheNuProjectContributors",

syntaxes/nushell.tmLanguage.json

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,17 @@
33
"name": "nushell",
44
"scopeName": "source.nushell",
55
"patterns": [
6-
{
7-
"include": "#keywords"
8-
},
9-
{
10-
"include": "#strings"
11-
},
12-
{
13-
"include": "#punctuation"
14-
},
15-
{
16-
"include": "#comment"
17-
},
18-
{
19-
"include": "#range"
20-
},
21-
{
22-
"include": "#parameter"
23-
},
24-
{
25-
"include": "#digit"
26-
},
27-
{
28-
"include": "#blockparam"
29-
},
30-
{
31-
"include": "#variable"
32-
},
33-
{
34-
"include": "#function"
35-
},
36-
{
37-
"include": "#type"
38-
}
6+
{ "include": "#keywords" },
7+
{ "include": "#strings" },
8+
{ "include": "#punctuation" },
9+
{ "include": "#comment" },
10+
{ "include": "#range" },
11+
{ "include": "#parameter" },
12+
{ "include": "#digit" },
13+
{ "include": "#blockparam" },
14+
{ "include": "#variable" },
15+
{ "include": "#function" },
16+
{ "include": "#type" }
3917
],
4018
"repository": {
4119
"keywords": {
@@ -271,4 +249,4 @@
271249
}
272250
}
273251
}
274-
}
252+
}

0 commit comments

Comments
 (0)