diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 300ff25..1d2ae12 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,7 @@ jobs: - uses: lannonbr/vsce-action@master with: - args: "package" + args: 'package' - name: Create Release id: create_release diff --git a/client/src/extension.ts b/client/src/extension.ts index 360faa9..9b25b8a 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -144,8 +144,8 @@ export function activate(context: vscode.ExtensionContext) { fileEvents: vscode.workspace.createFileSystemWatcher('**/.clientrc'), }, markdown: { - isTrusted: true - } + isTrusted: true, + }, }; // Create the language client and start the client. diff --git a/package-lock.json b/package-lock.json index 9ffb4ae..6d0e703 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-nushell-lang", - "version": "1.8.0", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-nushell-lang", - "version": "1.8.0", + "version": "1.9.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -29,6 +29,7 @@ "prettier": "3.2.5", "ts-loader": "^9.2.8", "typescript": "^5.0.2", + "vscode-tmgrammar-test": "^0.1.3", "webpack": "^5.70.0", "webpack-cli": "^4.9.2" }, @@ -84,22 +85,6 @@ "node": ">=10.0.0" } }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz", - "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -995,6 +980,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", @@ -1623,294 +1614,6 @@ "esbuild-windows-arm64": "0.14.54" } }, - "node_modules/esbuild-android-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz", - "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-android-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz", - "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz", - "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", - "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz", - "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz", - "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-32": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz", - "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz", - "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz", - "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz", - "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz", - "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz", - "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz", - "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-s390x": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz", - "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-netbsd-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz", - "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-openbsd-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz", - "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-sunos-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz", - "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-32": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz", - "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/esbuild-windows-64": { "version": "0.14.54", "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz", @@ -1927,22 +1630,6 @@ "node": ">=12" } }, - "node_modules/esbuild-windows-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz", - "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2397,20 +2084,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -4853,6 +4526,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 8ef574b..bedde98 100644 --- a/package.json +++ b/package.json @@ -140,6 +140,7 @@ "watch": "npm run esbuild-base -- --sourcemap --watch", "lint": "npx eslint ./client/src ./server/src --ext .ts,.tsx", "test": "sh ./scripts/e2e.sh", + "test:grammar": "vscode-tmgrammar-snap tests/cases/*", "fmt": "prettier . --write" }, "dependencies": { @@ -162,6 +163,7 @@ "prettier": "3.2.5", "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/server/src/server.ts b/server/src/server.ts index 03a3206..8dcd331 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -484,7 +484,7 @@ connection.onHover(async (request: HoverParams) => { // getting runtime import errors to remove this deprecation warning. const contents = { value: obj.hover, - kind: "markdown" + kind: 'markdown', }; if (obj.hover != '') { diff --git a/syntaxes/nushell.tmLanguage.json b/syntaxes/nushell.tmLanguage.json index 403b24a..7933ba2 100644 --- a/syntaxes/nushell.tmLanguage.json +++ b/syntaxes/nushell.tmLanguage.json @@ -353,7 +353,7 @@ "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" }, diff --git a/tests/cases/function.nu b/tests/cases/function.nu new file mode 100644 index 0000000..3a28949 --- /dev/null +++ b/tests/cases/function.nu @@ -0,0 +1,11 @@ +export def --env my-function --env [] {} + +export def --env "my function1" --env [] {} + +export def --env 'my function2' --env [] {} + +export def --env my_function --env [] {} + +export def --env "my_function1" --env [] {} + +export def --env 'my_function2' --env [] {} diff --git a/tests/cases/function.nu.snap b/tests/cases/function.nu.snap new file mode 100644 index 0000000..8c1c9af --- /dev/null +++ b/tests/cases/function.nu.snap @@ -0,0 +1,76 @@ +>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 +> +>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 +> +>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 +> +>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 +> +>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 +> +>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