From 5388c33f67da94b49730717750e22f8726233eac Mon Sep 17 00:00:00 2001 From: Auca Coyan Date: Tue, 26 Mar 2024 17:46:08 -0300 Subject: [PATCH 1/3] :white_check_mark: add functions syntax test --- package-lock.json | 60 +++++++++++++++++++++++++++++-- package.json | 7 ++-- tests/cases/function.nu | 11 ++++++ tests/cases/function.nu.snap | 70 ++++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+), 5 deletions(-) create mode 100644 tests/cases/function.nu create mode 100644 tests/cases/function.nu.snap diff --git a/package-lock.json b/package-lock.json index 16f0eb8..0f9df5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-nushell-lang", - "version": "1.7.1", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-nushell-lang", - "version": "1.7.1", + "version": "1.9.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -28,6 +28,7 @@ "mocha": "^9.2.1", "ts-loader": "^9.2.8", "typescript": "^5.0.2", + "vscode-tmgrammar-test": "^0.1.3", "webpack": "^5.70.0", "webpack-cli": "^4.9.2" }, @@ -994,6 +995,12 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "node_modules/bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -4837,6 +4844,55 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-7.0.4.tgz", + "integrity": "sha512-9hJp0xL7HW1Q5OgGe03NACo7yiCTMEk3WU/rtKXUbncLtdg6rVVNJnHwD88UhbIYU2KoxY0Dih0x+kIsmUKn2A==", + "dev": true + }, + "node_modules/vscode-tmgrammar-test": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/vscode-tmgrammar-test/-/vscode-tmgrammar-test-0.1.3.tgz", + "integrity": "sha512-Wg6Pz+ePAT1O+F/A1Fc4wS5vY2X+HNtgN4qMdL+65NLQYd1/zdDWH4fhwsLjX8wTzeXkMy49Cr4ZqWTJ7VnVxg==", + "dev": true, + "dependencies": { + "bottleneck": "^2.19.5", + "chalk": "^2.4.2", + "commander": "^9.2.0", + "diff": "^4.0.2", + "glob": "^7.1.6", + "vscode-oniguruma": "^1.5.1", + "vscode-textmate": "^7.0.1" + }, + "bin": { + "vscode-tmgrammar-snap": "dist/snapshot.js", + "vscode-tmgrammar-test": "dist/unit.js" + } + }, + "node_modules/vscode-tmgrammar-test/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/vscode-tmgrammar-test/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/vscode-uri": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz", diff --git a/package.json b/package.json index 23d608a..5629934 100644 --- a/package.json +++ b/package.json @@ -143,15 +143,15 @@ }, "dependencies": { "glob": "^7.2.0", - "os": "^0.1.2", + "nushell-lsp-client": "file:client", "nushell-lsp-server": "file:server", - "nushell-lsp-client": "file:client" + "os": "^0.1.2" }, "devDependencies": { "@types/mocha": "^9.1.0", "@types/node": "^16.11.7", - "@types/vscode": "^1.65.0", "@types/tmp": "^0.2.3", + "@types/vscode": "^1.65.0", "@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/parser": "^5.54.0", "@vscode/vsce": "^2.15.0", @@ -160,6 +160,7 @@ "mocha": "^9.2.1", "ts-loader": "^9.2.8", "typescript": "^5.0.2", + "vscode-tmgrammar-test": "^0.1.3", "webpack": "^5.70.0", "webpack-cli": "^4.9.2" }, diff --git a/tests/cases/function.nu b/tests/cases/function.nu new file mode 100644 index 0000000..4c30f23 --- /dev/null +++ b/tests/cases/function.nu @@ -0,0 +1,11 @@ +def my-function [] {} + +def "my function1" [] {} + +def 'my function2' [] {} + +def my_function [] {} + +def "my_function1" [] {} + +def 'my_function2' [] {} diff --git a/tests/cases/function.nu.snap b/tests/cases/function.nu.snap new file mode 100644 index 0000000..e050760 --- /dev/null +++ b/tests/cases/function.nu.snap @@ -0,0 +1,70 @@ +>def my-function [] {} +#^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^^^^^^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +> +>def "my function1" [] {} +#^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^^^^^^^^^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +> +>def 'my function2' [] {} +#^^^ source.nushell meta.command.nushell keyword.other.builtin.nushell +# ^ source.nushell meta.command.nushell +# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.begin.nushell +# ^^^^^^^^^^^^ source.nushell meta.command.nushell string.quoted.single.nushell +# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.end.nushell +# ^ source.nushell meta.command.nushell +# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.end.nushell +# ^ source.nushell meta.command.nushell +# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.begin.bracket.curly.nushell +# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.end.bracket.curly.nushell +> +>def my_function [] {} +#^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^^^^^^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +> +>def "my_function1" [] {} +#^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^^^^^^^^^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +> +>def 'my_function2' [] {} +#^^^ source.nushell meta.command.nushell keyword.other.builtin.nushell +# ^ source.nushell meta.command.nushell +# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.begin.nushell +# ^^^^^^^^^^^^ source.nushell meta.command.nushell string.quoted.single.nushell +# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.end.nushell +# ^ source.nushell meta.command.nushell +# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.end.nushell +# ^ source.nushell meta.command.nushell +# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.begin.bracket.curly.nushell +# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.end.bracket.curly.nushell +> \ No newline at end of file From 198c4f1fbce6119a65c88695710d7bbc8ac38e3d Mon Sep 17 00:00:00 2001 From: Auca Coyan Date: Tue, 26 Mar 2024 20:30:36 -0300 Subject: [PATCH 2/3] :white_check_mark: add function test --- package.json | 5 +- syntaxes/nushell.tmLanguage.json | 6 +- tests/cases/function.nu | 12 +-- tests/cases/function.nu.snap | 134 ++++++++++++++++--------------- 4 files changed, 83 insertions(+), 74 deletions(-) diff --git a/package.json b/package.json index 5629934..71adaa7 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,8 @@ "install": "cd server && npm install && cd ../client && npm install && cd ..", "watch": "npm run esbuild-base -- --sourcemap --watch", "lint": "npx eslint ./client/src ./server/src --ext .ts,.tsx", - "test": "sh ./scripts/e2e.sh" + "test": "sh ./scripts/e2e.sh", + "test:grammar": "vscode-tmgrammar-snap tests/cases/*" }, "dependencies": { "glob": "^7.2.0", @@ -174,4 +175,4 @@ "color": "#008000", "theme": "light" } -} +} \ No newline at end of file diff --git a/syntaxes/nushell.tmLanguage.json b/syntaxes/nushell.tmLanguage.json index c9cf7dc..310fa87 100644 --- a/syntaxes/nushell.tmLanguage.json +++ b/syntaxes/nushell.tmLanguage.json @@ -357,11 +357,13 @@ "patterns": [{ "include": "source.nushell" }] }, "function": { - "begin": "((?:export\\s+)?def(?:\\s+--\\w+)?)\\s+([\\w\\-]+|\"[\\w\\- ]+\")(\\s+--\\w+)?", + "begin": "((?:export\\s+)?def(?:\\s+--\\w+)?)\\s+(\"?'?([\\w\\- ]+)\"?'?|[\\w\\-]+)(\\s+--\\w+)?", "beginCaptures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.type.nushell" }, - "3": { "name": "entity.name.function.nushell" } + "3": { "name": "entity.name.type.nushell" }, + "4": { "name": "entity.name.type.nushell" }, + "5": { "name": "entity.name.function.nushell" } }, "end": "(?<=\\})", "patterns": [ diff --git a/tests/cases/function.nu b/tests/cases/function.nu index 4c30f23..3a28949 100644 --- a/tests/cases/function.nu +++ b/tests/cases/function.nu @@ -1,11 +1,11 @@ -def my-function [] {} +export def --env my-function --env [] {} -def "my function1" [] {} +export def --env "my function1" --env [] {} -def 'my function2' [] {} +export def --env 'my function2' --env [] {} -def my_function [] {} +export def --env my_function --env [] {} -def "my_function1" [] {} +export def --env "my_function1" --env [] {} -def 'my_function2' [] {} +export def --env 'my_function2' --env [] {} diff --git a/tests/cases/function.nu.snap b/tests/cases/function.nu.snap index e050760..8c1c9af 100644 --- a/tests/cases/function.nu.snap +++ b/tests/cases/function.nu.snap @@ -1,70 +1,76 @@ ->def my-function [] {} -#^^^ source.nushell entity.name.function.nushell -# ^ source.nushell -# ^^^^^^^^^^^ source.nushell entity.name.type.nushell -# ^ source.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell -# ^ source.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +>export def --env my-function --env [] {} +#^^^^^^^^^^^^^^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^^^^^^^^^^^^^^^^^^ source.nushell entity.name.type.nushell entity.name.type.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell > ->def "my function1" [] {} -#^^^ source.nushell entity.name.function.nushell -# ^ source.nushell -# ^^^^^^^^^^^^^^ source.nushell entity.name.type.nushell -# ^ source.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell -# ^ source.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +>export def --env "my function1" --env [] {} +#^^^^^^^^^^^^^^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^^^^^^^ source.nushell entity.name.type.nushell entity.name.type.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell > ->def 'my function2' [] {} -#^^^ source.nushell meta.command.nushell keyword.other.builtin.nushell -# ^ source.nushell meta.command.nushell -# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.begin.nushell -# ^^^^^^^^^^^^ source.nushell meta.command.nushell string.quoted.single.nushell -# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.end.nushell -# ^ source.nushell meta.command.nushell -# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.begin.nushell -# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.end.nushell -# ^ source.nushell meta.command.nushell -# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.begin.bracket.curly.nushell -# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.end.bracket.curly.nushell +>export def --env 'my function2' --env [] {} +#^^^^^^^^^^^^^^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^^^^^^^ source.nushell entity.name.type.nushell entity.name.type.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell > ->def my_function [] {} -#^^^ source.nushell entity.name.function.nushell -# ^ source.nushell -# ^^^^^^^^^^^ source.nushell entity.name.type.nushell -# ^ source.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell -# ^ source.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +>export def --env my_function --env [] {} +#^^^^^^^^^^^^^^^^ source.nushell entity.name.function.nushell +# ^^ source.nushell +# ^^^^^^^^^^^^^^^^^^ source.nushell entity.name.type.nushell entity.name.type.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell > ->def "my_function1" [] {} -#^^^ source.nushell entity.name.function.nushell -# ^ source.nushell -# ^^^^^^^^^^^^^^ source.nushell entity.name.type.nushell -# ^ source.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell -# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell -# ^ source.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell -# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell +>export def --env "my_function1" --env [] {} +#^^^^^^^^^^^^^^^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^^^^^^^ source.nushell entity.name.type.nushell entity.name.type.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell > ->def 'my_function2' [] {} -#^^^ source.nushell meta.command.nushell keyword.other.builtin.nushell -# ^ source.nushell meta.command.nushell -# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.begin.nushell -# ^^^^^^^^^^^^ source.nushell meta.command.nushell string.quoted.single.nushell -# ^ source.nushell meta.command.nushell string.quoted.single.nushell punctuation.definition.string.end.nushell -# ^ source.nushell meta.command.nushell -# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.begin.nushell -# ^ source.nushell meta.command.nushell meta.table.nushell meta.brace.square.end.nushell -# ^ source.nushell meta.command.nushell -# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.begin.bracket.curly.nushell -# ^ source.nushell meta.command.nushell meta.expression.braced.nushell punctuation.section.block.end.bracket.curly.nushell +>export def --env 'my_function2' --env [] {} +#^^^^^^^^^^^^^^^^ source.nushell entity.name.function.nushell +# ^ source.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^^^^^^^ source.nushell entity.name.type.nushell entity.name.type.nushell +# ^ source.nushell entity.name.type.nushell +# ^^^^^^ source.nushell entity.name.type.nushell +# ^ source.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.begin.nushell +# ^ source.nushell meta.function.parameters.nushell meta.brace.square.end.nushell +# ^ source.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.begin.nushell +# ^ source.nushell meta.function.body.nushell punctuation.definition.function.end.nushell > \ No newline at end of file From e94fd45c44da0d1b8cae50ec6437e40a94ac3dd8 Mon Sep 17 00:00:00 2001 From: Gly Date: Fri, 19 Apr 2024 01:13:08 +0200 Subject: [PATCH 3/3] textmate: Fix function parse --- syntaxes/nushell.tmLanguage.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/syntaxes/nushell.tmLanguage.json b/syntaxes/nushell.tmLanguage.json index b6f9857..7933ba2 100644 --- a/syntaxes/nushell.tmLanguage.json +++ b/syntaxes/nushell.tmLanguage.json @@ -353,13 +353,11 @@ "patterns": [{ "include": "source.nushell" }] }, "function": { - "begin": "((?:export\\s+)?def(?:\\s+--\\w+)?)\\s+(\"?'?([\\w\\- ]+)\"?'?|[\\w\\-]+)(\\s+--\\w+)?", + "begin": "((?:export\\s+)?def(?:\\s+--\\w+)*)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|`[\\w\\- ]+`)(\\s+--\\w+)*", "beginCaptures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.type.nushell" }, - "3": { "name": "entity.name.type.nushell" }, - "4": { "name": "entity.name.type.nushell" }, - "5": { "name": "entity.name.function.nushell" } + "3": { "name": "entity.name.function.nushell" } }, "end": "(?<=\\})", "patterns": [