A developer toolkit for the TSL, including syntax highlighting, LSP, formatter, and more.
Go to file
csh a22fc815ec fix and format 2025-09-11 14:26:41 +08:00
lsp-server refactor 2025-07-02 14:29:54 +08:00
test 2.3.0 2025-08-29 16:54:46 +08:00
vim update tsl.vim 2025-07-10 18:04:17 +08:00
vscode fix and format 2025-09-11 14:26:41 +08:00
.clang-format refactor 2025-07-02 14:29:54 +08:00
.clangd update .clangd 2025-07-03 08:39:40 +08:00
.gitignore update .gitignore 2025-07-02 14:31:00 +08:00
README.md 2.3.0 2025-07-03 20:07:54 +08:00

README.md

TSL Devkit

该插件提供 tsl 语言的语法高亮以及LSP代码补全

支持LSP需要安装nodejs

VSCode

安装方式一(推荐)

安装vsix扩展

code --install-extension tsl-tools-1.0.0.vsix  # 具体版本号以vsix文件为准

安装方式二

复制vscode文件夹到VSCode扩展目录(建议更改文件夹名)

Windows: %USERPROFILE%\.vscode\extensions
macOS: ~/.vscode/extensions
Linux: ~/.vscode/extensions

安装方式三

本项目vscode目录下执行

npm install
npx vsce package

# 安装
code --install-extension tsl-tools-1.0.0.vsix # 具体版本号以vsix文件为准

Vim

需要vim 9.0以上版本

tsl.vim放入~/.vim/syntax/

" vimrc加入可同时支持tsl和tsf
autocmd BufNewFile,BufRead *.ts[lf] setf tsl

使用LSP,需要在你的languageserver设置相关的参数,以coc.nvim为例,需要在coc-settings.json设置如下内容

"languageserver": {
  "tsl-server": {
    "command": "tsl-server",
    "args": ["--log=trace", "--log=stderr"],
    "filetypes": ["tsl", "tsf"]
  }
}