3.0.0
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
Notable changes to the `TSL` extension will be documented in thio file.
|
||||
|
||||
## [3.0.0]: 2025-09-28
|
||||
|
||||
- 支持`lsp`全局函数补全
|
||||
- 降低`vscode`支持版本到`1.90.0`
|
||||
|
||||
## [2.3.1]: 2025-07-10
|
||||
|
||||
- 修复:关键字`initialization`拼写错误
|
||||
|
||||
+77
-4
@@ -1,7 +1,80 @@
|
||||
# TSL-Devkit
|
||||
# TSL Tools for VSCode
|
||||
|
||||
`tsl`的`vscode`插件工具集
|
||||
<p align="left">
|
||||
<strong>强大的 TSL 语言开发工具集</strong><br>
|
||||
为 VSCode 提供完整的 TSL 语言支持
|
||||
</p>
|
||||
|
||||
- 支持`textMate`语法高亮
|
||||
- 支持`LSP`补全
|
||||
## ✨ 功能特性
|
||||
|
||||
- 🎨 **语法高亮** - 基于 TextMate 语法的智能代码着色
|
||||
- 🔧 **语言服务器协议 (LSP)** - 提供智能代码补全、错误检查、跳转定义等功能
|
||||
- 📝 **代码片段 (Snippets)** - 快速插入常用代码模板
|
||||
|
||||
## 📦 安装方式
|
||||
|
||||
### 方式一:通过 VSIX 文件安装(推荐)
|
||||
|
||||
直接使用预编译的扩展包:
|
||||
|
||||
```bash
|
||||
# 命令行安装
|
||||
code --install-extension tsl-tools-3.0.0.vsix
|
||||
```
|
||||
|
||||
或者在 VSCode 中:
|
||||
|
||||
1. 打开命令面板 (`Ctrl+Shift+P` / `Cmd+Shift+P`)
|
||||
2. 输入 `Install from VSIX`
|
||||
3. 选择 `tsl-tools-3.0.0.vsix` 文件
|
||||
|
||||
### 方式二:从源码构建
|
||||
|
||||
```bash
|
||||
# 克隆仓库
|
||||
git clone https://git.mytsl.cn/csh/tsl-devkit.git
|
||||
cd tsl-devkit
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 打包扩展
|
||||
npx vsce package
|
||||
|
||||
# 安装生成的 VSIX 文件
|
||||
code --install-extension tsl-tools-3.0.0.vsix
|
||||
```
|
||||
|
||||
### 方式三:手动安装
|
||||
|
||||
将扩展文件夹复制到 VSCode 扩展目录:
|
||||
|
||||
| 操作系统 | 扩展目录路径 |
|
||||
| -------- | ---------------------------------- |
|
||||
| Windows | `%USERPROFILE%\.vscode\extensions` |
|
||||
| macOS | `~/.vscode/extensions` |
|
||||
| Linux | `~/.vscode/extensions` |
|
||||
|
||||
## ⚙️ 配置选项
|
||||
|
||||
在 VSCode 设置中配置 TSL 扩展:
|
||||
|
||||
### 语言服务器配置
|
||||
|
||||
| 配置项 | 类型 | 默认值 | 描述 |
|
||||
| --- | --- | --- | --- |
|
||||
| `tsl.server.executable` | `string` | `""` | TSL 语言服务器可执行文件路径<br>_留空自动检测_ |
|
||||
| `tsl.server.arguments` | `string[]` | `["--log=trace", "--log-stderr"]` | 语言服务器启动参数<br>_使用 `./tsl-server --help` 查看所有选项_ |
|
||||
| `tsl.interpreter.executable` | `string` | `""` | TSL 解释器路径<br>_用于识别 funcext 下的 .tsf 文件_ |
|
||||
|
||||
### 配置示例
|
||||
|
||||
```json
|
||||
{
|
||||
"tsl.server.executable": "/usr/local/bin/tsl-server",
|
||||
"tsl.server.arguments": ["--log=info", "--log-stderr"],
|
||||
"tsl.interpreter.executable": "/usr/local/bin/tsl"
|
||||
}
|
||||
```
|
||||
|
||||
> ⚠️ **注意**: `tsl.interpreter.executable` 与服务器参数 `--interpreter=PATH` 冲突,请只使用其中一个
|
||||
|
||||
Generated
+77
-77
@@ -1,25 +1,25 @@
|
||||
{
|
||||
"name": "tsl-tools",
|
||||
"version": "2.4.0",
|
||||
"version": "3.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tsl-tools",
|
||||
"version": "2.4.0",
|
||||
"version": "3.0.0",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.0.3",
|
||||
"@types/vscode": "^1.101.0",
|
||||
"@types/node": "^24.5.2",
|
||||
"@types/vscode": "^1.90.0",
|
||||
"@vscode/vsce": "^3.6.0",
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "^5.8.3"
|
||||
"prettier": "^3.6.2",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.101.0"
|
||||
"vscode": "^1.90.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azu/format-text": {
|
||||
@@ -171,22 +171,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/msal-browser": {
|
||||
"version": "4.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.23.0.tgz",
|
||||
"integrity": "sha512-uHnfRwGAEHaYVXzpCtYsruy6PQxL2v76+MJ3+n/c/3PaTiTIa5ch7VofTUNoA39nHyjJbdiqTwFZK40OOTOkjw==",
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.24.0.tgz",
|
||||
"integrity": "sha512-BNoiUEx4olj16U9ZiquvIhG1dZBnwWSzSXiSclq/9qiFQXYeLOKqEaEv98+xLXJ3oLw9APwHTR1eY2Qk0v6XBQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/msal-common": "15.12.0"
|
||||
"@azure/msal-common": "15.13.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/msal-common": {
|
||||
"version": "15.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.12.0.tgz",
|
||||
"integrity": "sha512-4ucXbjVw8KJ5QBgnGJUeA07c8iznwlk5ioHIhI4ASXcXgcf2yRFhWzYOyWg/cI49LC9ekpFJeQtO3zjDTbl6TQ==",
|
||||
"version": "15.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.13.0.tgz",
|
||||
"integrity": "sha512-8oF6nj02qX7eE/6+wFT5NluXRHc05AgdCC3fJnkjiJooq8u7BcLmxaYYSwc2AfEkWRMRi6Eyvvbeqk4U4412Ag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -194,13 +194,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/msal-node": {
|
||||
"version": "3.7.4",
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.7.4.tgz",
|
||||
"integrity": "sha512-fjqvhrThwzzPvqhFOdkkGRJCHPQZTNijpceVy8QjcfQuH482tOVEjHyamZaioOhVtx+FK1u+eMpJA2Zz4U9LVg==",
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.8.0.tgz",
|
||||
"integrity": "sha512-23BXm82Mp5XnRhrcd4mrHa0xuUNRp96ivu3nRatrfdAqjoeWAGyD0eEAafxAOHAEWWmdlyFK4ELFcdziXyw2sA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/msal-common": "15.12.0",
|
||||
"@azure/msal-common": "15.13.0",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"uuid": "^8.3.0"
|
||||
},
|
||||
@@ -655,17 +655,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vscode/vsce": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-3.6.0.tgz",
|
||||
"integrity": "sha512-u2ZoMfymRNJb14aHNawnXJtXHLXDVKc1oKZaH4VELKT/9iWKRVgtQOdwxCgtwSxJoqYvuK4hGlBWQJ05wxADhg==",
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-3.6.2.tgz",
|
||||
"integrity": "sha512-gvBfarWF+Ii20ESqjA3dpnPJpQJ8fFJYtcWtjwbRADommCzGg1emtmb34E+DKKhECYvaVyAl+TF9lWS/3GSPvg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/identity": "^4.1.0",
|
||||
"@secretlint/node": "^10.1.1",
|
||||
"@secretlint/secretlint-formatter-sarif": "^10.1.1",
|
||||
"@secretlint/secretlint-rule-no-dotenv": "^10.1.1",
|
||||
"@secretlint/secretlint-rule-preset-recommend": "^10.1.1",
|
||||
"@secretlint/node": "^10.1.2",
|
||||
"@secretlint/secretlint-formatter-sarif": "^10.1.2",
|
||||
"@secretlint/secretlint-rule-no-dotenv": "^10.1.2",
|
||||
"@secretlint/secretlint-rule-preset-recommend": "^10.1.2",
|
||||
"@vscode/vsce-sign": "^2.0.0",
|
||||
"azure-devops-node-api": "^12.5.0",
|
||||
"chalk": "^4.1.2",
|
||||
@@ -682,7 +682,7 @@
|
||||
"minimatch": "^3.0.3",
|
||||
"parse-semver": "^1.1.1",
|
||||
"read": "^1.0.7",
|
||||
"secretlint": "^10.1.1",
|
||||
"secretlint": "^10.1.2",
|
||||
"semver": "^7.5.2",
|
||||
"tmp": "^0.2.3",
|
||||
"typed-rest-client": "^1.8.4",
|
||||
@@ -702,28 +702,28 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign/-/vsce-sign-2.0.6.tgz",
|
||||
"integrity": "sha512-j9Ashk+uOWCDHYDxgGsqzKq5FXW9b9MW7QqOIYZ8IYpneJclWTBeHZz2DJCSKQgo+JAqNcaRRE1hzIx0dswqAw==",
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign/-/vsce-sign-2.0.7.tgz",
|
||||
"integrity": "sha512-cz0GFW8qCxpypOy3y509u26K1FIPMlDIHBwGmDyvEbgoma2v3y5YIHHuijr8zCYBp9kzCCOJd28s/0PG7cA7ew==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "SEE LICENSE IN LICENSE.txt",
|
||||
"optionalDependencies": {
|
||||
"@vscode/vsce-sign-alpine-arm64": "2.0.5",
|
||||
"@vscode/vsce-sign-alpine-x64": "2.0.5",
|
||||
"@vscode/vsce-sign-darwin-arm64": "2.0.5",
|
||||
"@vscode/vsce-sign-darwin-x64": "2.0.5",
|
||||
"@vscode/vsce-sign-linux-arm": "2.0.5",
|
||||
"@vscode/vsce-sign-linux-arm64": "2.0.5",
|
||||
"@vscode/vsce-sign-linux-x64": "2.0.5",
|
||||
"@vscode/vsce-sign-win32-arm64": "2.0.5",
|
||||
"@vscode/vsce-sign-win32-x64": "2.0.5"
|
||||
"@vscode/vsce-sign-alpine-arm64": "2.0.6",
|
||||
"@vscode/vsce-sign-alpine-x64": "2.0.6",
|
||||
"@vscode/vsce-sign-darwin-arm64": "2.0.6",
|
||||
"@vscode/vsce-sign-darwin-x64": "2.0.6",
|
||||
"@vscode/vsce-sign-linux-arm": "2.0.6",
|
||||
"@vscode/vsce-sign-linux-arm64": "2.0.6",
|
||||
"@vscode/vsce-sign-linux-x64": "2.0.6",
|
||||
"@vscode/vsce-sign-win32-arm64": "2.0.6",
|
||||
"@vscode/vsce-sign-win32-x64": "2.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-alpine-arm64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-arm64/-/vsce-sign-alpine-arm64-2.0.5.tgz",
|
||||
"integrity": "sha512-XVmnF40APwRPXSLYA28Ye+qWxB25KhSVpF2eZVtVOs6g7fkpOxsVnpRU1Bz2xG4ySI79IRuapDJoAQFkoOgfdQ==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-arm64/-/vsce-sign-alpine-arm64-2.0.6.tgz",
|
||||
"integrity": "sha512-wKkJBsvKF+f0GfsUuGT0tSW0kZL87QggEiqNqK6/8hvqsXvpx8OsTEc3mnE1kejkh5r+qUyQ7PtF8jZYN0mo8Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -735,9 +735,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-alpine-x64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-x64/-/vsce-sign-alpine-x64-2.0.5.tgz",
|
||||
"integrity": "sha512-JuxY3xcquRsOezKq6PEHwCgd1rh1GnhyH6urVEWUzWn1c1PC4EOoyffMD+zLZtFuZF5qR1I0+cqDRNKyPvpK7Q==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-x64/-/vsce-sign-alpine-x64-2.0.6.tgz",
|
||||
"integrity": "sha512-YoAGlmdK39vKi9jA18i4ufBbd95OqGJxRvF3n6ZbCyziwy3O+JgOpIUPxv5tjeO6gQfx29qBivQ8ZZTUF2Ba0w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -749,9 +749,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-darwin-arm64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-arm64/-/vsce-sign-darwin-arm64-2.0.5.tgz",
|
||||
"integrity": "sha512-z2Q62bk0ptADFz8a0vtPvnm6vxpyP3hIEYMU+i1AWz263Pj8Mc38cm/4sjzxu+LIsAfhe9HzvYNS49lV+KsatQ==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-arm64/-/vsce-sign-darwin-arm64-2.0.6.tgz",
|
||||
"integrity": "sha512-5HMHaJRIQuozm/XQIiJiA0W9uhdblwwl2ZNDSSAeXGO9YhB9MH5C4KIHOmvyjUnKy4UCuiP43VKpIxW1VWP4tQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -763,9 +763,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-darwin-x64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-x64/-/vsce-sign-darwin-x64-2.0.5.tgz",
|
||||
"integrity": "sha512-ma9JDC7FJ16SuPXlLKkvOD2qLsmW/cKfqK4zzM2iJE1PbckF3BlR08lYqHV89gmuoTpYB55+z8Y5Fz4wEJBVDA==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-x64/-/vsce-sign-darwin-x64-2.0.6.tgz",
|
||||
"integrity": "sha512-25GsUbTAiNfHSuRItoQafXOIpxlYj+IXb4/qarrXu7kmbH94jlm5sdWSCKrrREs8+GsXF1b+l3OB7VJy5jsykw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -777,9 +777,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-linux-arm": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm/-/vsce-sign-linux-arm-2.0.5.tgz",
|
||||
"integrity": "sha512-cdCwtLGmvC1QVrkIsyzv01+o9eR+wodMJUZ9Ak3owhcGxPRB53/WvrDHAFYA6i8Oy232nuen1YqWeEohqBuSzA==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm/-/vsce-sign-linux-arm-2.0.6.tgz",
|
||||
"integrity": "sha512-UndEc2Xlq4HsuMPnwu7420uqceXjs4yb5W8E2/UkaHBB9OWCwMd3/bRe/1eLe3D8kPpxzcaeTyXiK3RdzS/1CA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -791,9 +791,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-linux-arm64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm64/-/vsce-sign-linux-arm64-2.0.5.tgz",
|
||||
"integrity": "sha512-Hr1o0veBymg9SmkCqYnfaiUnes5YK6k/lKFA5MhNmiEN5fNqxyPUCdRZMFs3Ajtx2OFW4q3KuYVRwGA7jdLo7Q==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm64/-/vsce-sign-linux-arm64-2.0.6.tgz",
|
||||
"integrity": "sha512-cfb1qK7lygtMa4NUl2582nP7aliLYuDEVpAbXJMkDq1qE+olIw/es+C8j1LJwvcRq1I2yWGtSn3EkDp9Dq5FdA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -805,9 +805,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-linux-x64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.5.tgz",
|
||||
"integrity": "sha512-XLT0gfGMcxk6CMRLDkgqEPTyG8Oa0OFe1tPv2RVbphSOjFWJwZgK3TYWx39i/7gqpDHlax0AP6cgMygNJrA6zg==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.6.tgz",
|
||||
"integrity": "sha512-/olerl1A4sOqdP+hjvJ1sbQjKN07Y3DVnxO4gnbn/ahtQvFrdhUi0G1VsZXDNjfqmXw57DmPi5ASnj/8PGZhAA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -819,9 +819,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-win32-arm64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-arm64/-/vsce-sign-win32-arm64-2.0.5.tgz",
|
||||
"integrity": "sha512-hco8eaoTcvtmuPhavyCZhrk5QIcLiyAUhEso87ApAWDllG7djIrWiOCtqn48k4pHz+L8oCQlE0nwNHfcYcxOPw==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-arm64/-/vsce-sign-win32-arm64-2.0.6.tgz",
|
||||
"integrity": "sha512-ivM/MiGIY0PJNZBoGtlRBM/xDpwbdlCWomUWuLmIxbi1Cxe/1nooYrEQoaHD8ojVRgzdQEUzMsRbyF5cJJgYOg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -833,9 +833,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vscode/vsce-sign-win32-x64": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.5.tgz",
|
||||
"integrity": "sha512-1ixKFGM2FwM+6kQS2ojfY3aAelICxjiCzeg4nTHpkeU1Tfs4RC+lVLrgq5NwcBC7ZLr6UfY3Ct3D6suPeOf7BQ==",
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.6.tgz",
|
||||
"integrity": "sha512-mgth9Kvze+u8CruYMmhHw6Zgy3GRX2S+Ed5oSokDEK5vPEwGGKnmuXua9tmFhomeAnhgJnL4DCna3TiNuGrBTQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -874,9 +874,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-escapes": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.1.0.tgz",
|
||||
"integrity": "sha512-YdhtCd19sKRKfAAUsrcC1wzm4JuzJoiX4pOJqIoW2qmKj5WzG/dL8uUJ0361zaXtHqK7gEhOwtAtz7t3Yq3X5g==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.1.1.tgz",
|
||||
"integrity": "sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1415,9 +1415,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.0.tgz",
|
||||
"integrity": "sha512-vEtk+OcP7VBRtQZ1EJ3bdgzSfBjgnEalLTp5zjJrS+2Z1w2KZly4SBdac/WDU3hhsNAZ9E8SC96ME4Ey8MZ7cg==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.1.tgz",
|
||||
"integrity": "sha512-ecqj/sy1jcK1uWrwpR67UhYrIFQ+5WlGxth34WquCbamhFA6hkkwiu37o6J5xCHdo1oixJRfVRw+ywV+Hq/0Aw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
@@ -2119,9 +2119,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/index-to-position": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz",
|
||||
"integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz",
|
||||
"integrity": "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2944,9 +2944,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-scurry/node_modules/lru-cache": {
|
||||
"version": "11.2.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz",
|
||||
"integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==",
|
||||
"version": "11.2.2",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz",
|
||||
"integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
|
||||
+10
-4
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tsl-tools",
|
||||
"displayName": "TSL",
|
||||
"version": "2.4.0",
|
||||
"version": "3.0.0",
|
||||
"description": "VSCode extension for TSL, with syntax highlighting, code completion, and formatting",
|
||||
"publisher": "csh",
|
||||
"homepage": "https://git.mytsl.cn/csh/tsl-devkit",
|
||||
@@ -43,6 +43,12 @@
|
||||
"path": "./syntaxes/tsl.tmLanguage.json"
|
||||
}
|
||||
],
|
||||
"snippets": [
|
||||
{
|
||||
"language": "tsl",
|
||||
"path": "./snippets/tsl.json"
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "TSL",
|
||||
@@ -55,7 +61,7 @@
|
||||
"tsl.server.arguments": {
|
||||
"type": "array",
|
||||
"default": [
|
||||
"--log=trace",
|
||||
"--log=info",
|
||||
"--log-stderr"
|
||||
],
|
||||
"description": "Arguments for TSL server",
|
||||
@@ -84,13 +90,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.5.2",
|
||||
"@types/vscode": "^1.101.0",
|
||||
"@types/vscode": "^1.90.0",
|
||||
"@vscode/vsce": "^3.6.0",
|
||||
"prettier": "^3.6.2",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.101.0"
|
||||
"vscode": "^1.90.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "^9.0.1"
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
{
|
||||
"If Statement": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition} then",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "If statement"
|
||||
},
|
||||
"If-Else Statement": {
|
||||
"prefix": "ifelse",
|
||||
"body": [
|
||||
"if ${1:condition} then",
|
||||
"begin",
|
||||
"\t$2",
|
||||
"end",
|
||||
"else",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "If-else statement"
|
||||
},
|
||||
"If-ElseIf-Else Statement": {
|
||||
"prefix": "ifelif",
|
||||
"body": [
|
||||
"if ${1:condition1} then",
|
||||
"begin",
|
||||
"\t$2",
|
||||
"end",
|
||||
"else if ${3:condition2} then",
|
||||
"begin",
|
||||
"\t$4",
|
||||
"end",
|
||||
"else",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "If-elseif-else statement"
|
||||
},
|
||||
"For Loop (To)": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:i} := ${2:0} to ${3:10} do",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "For loop with counter"
|
||||
},
|
||||
"For Loop (DownTo)": {
|
||||
"prefix": "fordown",
|
||||
"body": [
|
||||
"for ${1:i} := ${2:10} downto ${3:0} do",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "For loop with counter (downto)"
|
||||
},
|
||||
"For-In Loop": {
|
||||
"prefix": "forin",
|
||||
"body": [
|
||||
"for ${1:key}, ${2:value} in ${3:collection} do",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "For-in loop"
|
||||
},
|
||||
"While Loop": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:condition} do",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "While loop"
|
||||
},
|
||||
"Repeat-Until Loop": {
|
||||
"prefix": "repeat",
|
||||
"body": [
|
||||
"repeat",
|
||||
"\t$0",
|
||||
"until ${1:condition};"
|
||||
],
|
||||
"description": "Repeat-until loop"
|
||||
},
|
||||
"Case Statement": {
|
||||
"prefix": "case",
|
||||
"body": [
|
||||
"case ${1:expression} of",
|
||||
"\t${2:value1}:",
|
||||
"\tbegin",
|
||||
"\t\t${3:statements}",
|
||||
"\tend;",
|
||||
"\t${4:value2}:",
|
||||
"\tbegin",
|
||||
"\t\t${5:statements}",
|
||||
"\tend;",
|
||||
"else",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end",
|
||||
"end;"
|
||||
],
|
||||
"description": "Case statement"
|
||||
},
|
||||
"Try-Except Block": {
|
||||
"prefix": "try",
|
||||
"body": [
|
||||
"try",
|
||||
"\t$1",
|
||||
"except",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Try-except block"
|
||||
},
|
||||
"Function Declaration": {
|
||||
"prefix": "funcdecl",
|
||||
"body": [
|
||||
"function ${1:functionName}(${2:})${3:: ${4:returnType}};$0"
|
||||
],
|
||||
"description": "Function declaration only"
|
||||
},
|
||||
"Function Implementation": {
|
||||
"prefix": "func",
|
||||
"body": [
|
||||
"function ${1:functionName}(${2:})${3:: ${4:returnType}};",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Function implementation"
|
||||
},
|
||||
"Function with Parameters": {
|
||||
"prefix": "funcparam",
|
||||
"body": [
|
||||
"function ${1:functionName}(${2:param1}: ${3:type1}; ${4:param2}: ${5:type2})${6:: ${7:returnType}};",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Function with typed parameters"
|
||||
},
|
||||
"Function with Var Parameters": {
|
||||
"prefix": "funcvar",
|
||||
"body": [
|
||||
"function ${1:functionName}(var ${2:param1}: ${3:type1}; ${4:param2}: ${5:type2})${6:: ${7:returnType}};",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Function with var/out parameters"
|
||||
},
|
||||
"Anonymous Function": {
|
||||
"prefix": "anonfunc",
|
||||
"body": [
|
||||
"function(${1:})${2:: ${3:returnType}}",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Anonymous function"
|
||||
},
|
||||
"Unit Module": {
|
||||
"prefix": "unit",
|
||||
"body": [
|
||||
"unit ${1:UnitName};",
|
||||
"",
|
||||
"interface",
|
||||
"\t$2",
|
||||
"",
|
||||
"implementation",
|
||||
"\t$0",
|
||||
"",
|
||||
"end."
|
||||
],
|
||||
"description": "Unit module structure"
|
||||
},
|
||||
"Unit with Initialization": {
|
||||
"prefix": "unitfull",
|
||||
"body": [
|
||||
"unit ${1:UnitName};",
|
||||
"",
|
||||
"interface",
|
||||
"\t${2:// public declarations}",
|
||||
"",
|
||||
"implementation",
|
||||
"\t${3:// implementation}",
|
||||
"",
|
||||
"initialization",
|
||||
"\t${4:// initialization code}",
|
||||
"",
|
||||
"finalization",
|
||||
"\t${5:// cleanup code}",
|
||||
"",
|
||||
"end."
|
||||
],
|
||||
"description": "Complete unit with initialization and finalization"
|
||||
},
|
||||
"Class Definition": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"type ${1:ClassName} = class${2:(${3:ParentClass})}",
|
||||
"\t${4:public}",
|
||||
"\t\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Class definition"
|
||||
},
|
||||
"Class with Public/Private": {
|
||||
"prefix": "classfull",
|
||||
"body": [
|
||||
"type ${1:ClassName} = class${2:(${3:ParentClass})}",
|
||||
"\tpublic",
|
||||
"\t\tfunction ${4:methodName}(${5:})${6:: ${7:returnType}};",
|
||||
"\t\t$0",
|
||||
"\tprotected",
|
||||
"\t\t",
|
||||
"\tprivate",
|
||||
"\t\t",
|
||||
"end;"
|
||||
],
|
||||
"description": "Class with public/protected/private sections"
|
||||
},
|
||||
"Class Method Implementation": {
|
||||
"prefix": "classmethod",
|
||||
"body": [
|
||||
"function ${1:ClassName}.${2:methodName}(${3:})${4:: ${5:returnType}};",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Class method implementation"
|
||||
},
|
||||
"Class Method with Override": {
|
||||
"prefix": "methodoverride",
|
||||
"body": [
|
||||
"function ${1:methodName}(${2:})${3:: ${4:returnType}};",
|
||||
"override;",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Override method in class"
|
||||
},
|
||||
"Class Method with Virtual": {
|
||||
"prefix": "methodvirtual",
|
||||
"body": [
|
||||
"function ${1:methodName}(${2:})${3:: ${4:returnType}};",
|
||||
"virtual;",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end;"
|
||||
],
|
||||
"description": "Virtual method in class"
|
||||
},
|
||||
"Property Declaration": {
|
||||
"prefix": "prop",
|
||||
"body": [
|
||||
"property ${1:propertyName}: ${2:type} read ${3:getter} write ${4:setter};$0"
|
||||
],
|
||||
"description": "Property with getter and setter"
|
||||
},
|
||||
"Property Read Only": {
|
||||
"prefix": "propread",
|
||||
"body": [
|
||||
"property ${1:propertyName}: ${2:type} read ${3:getter};$0"
|
||||
],
|
||||
"description": "Read-only property"
|
||||
},
|
||||
"Begin-End Block": {
|
||||
"prefix": "begin",
|
||||
"body": [
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Begin-end block"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user