# btlua-docs **Repository Path**: zhurengong/btlua-docs ## Basic Information - **Project Name**: btlua-docs - **Description**: 渊深vscode-lua文档 - **Primary Language**: Lua - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-10-26 - **Last Updated**: 2025-09-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## The doc has been updated to v1.8.6.2 ## English Version Below #### 语言服务 - 分析所有必要的C#类型 - 分析所有成员(字段、属性、索引器、方法、构造器) - 分析泛型类型、委托、重载运算符 - 分析C#类型在Lua中的各种变体 - 分析参量参数、可选参数 #### 使用方法 1. 下载发布页面`Library`里的`types.zip`并解压 2. Vscode安装插件:https://marketplace.visualstudio.com/items?itemName=sumneko.lua 3. 创建一个Vscode工作区,在.vscode\settings.json下添加如下代码: ``` 开发客户端脚本 "Lua.diagnostics.libraryFiles": "Enable", "Lua.workspace.library": [ "$types.zip的解压路径$/types/client", "$types.zip的解压路径$/types/shared", ], ``` ``` 开发服务端脚本 "Lua.diagnostics.libraryFiles": "Enable", "Lua.workspace.library": [ "$types.zip的解压路径$/types/server", "$types.zip的解压路径$/types/shared", ], ``` 推荐配置模板 ```json { "settings": { "Lua.diagnostics.libraryFiles": "Enable", "Lua.workspace.library": [ // "P:/Repository/Barotrauma/btlua-docs/types/client", "P:/Repository/Barotrauma/btlua-docs/types/server", "P:/Repository/Barotrauma/btlua-docs/types/shared", ], "Lua.diagnostics.disable": [ "param-type-mismatch", "return-type-mismatch", "undefined-field", "need-check-nil", "assign-type-mismatch", "redundant-return-value", "missing-parameter", "undefined-global", "missing-return-value", "undefined-doc-name", "missing-return", "cast-local-type", "deprecated", ], } } ``` --- #### Language Services - Analyze all necessary C# Types - Analyze all members (fields, properties, indexers, methods, constructors) - Analyze generic types, delegates, overloaded operators - Analyze various variants of C# Type in Lua - Analyze variable parameters, optional parameters #### How to use 1. Download the `types.zip` from the `Library` release page and unzip it 2. Vscode install plug-in: https://marketplace.visualstudio.com/items?itemName=sumneko.lua 3. Create a Vscode workspace and add the following code under .vscode\settings.json: ``` Client-Side Develop "Lua.diagnostics.libraryFiles": "Enable", "Lua.workspace.library": [ "$unzip location of types.zip$/types/client", "$unzip location of types.zip$/types/shared", ], ``` ``` Server-Side Develop "Lua.diagnostics.libraryFiles": "Enable", "Lua.workspace.library": [ "$unzip location of types.zip$/types/server", "$unzip location of types.zip$/types/shared", ], ``` Recommended configuration Template ```json { "settings": { "Lua.diagnostics.libraryFiles": "Enable", "Lua.workspace.library": [ // "P:/Repository/Barotrauma/btlua-docs/types/client", "P:/Repository/Barotrauma/btlua-docs/types/server", "P:/Repository/Barotrauma/btlua-docs/types/shared", ], "Lua.diagnostics.disable": [ "param-type-mismatch", "return-type-mismatch", "undefined-field", "need-check-nil", "assign-type-mismatch", "redundant-return-value", "missing-parameter", "undefined-global", "missing-return-value", "undefined-doc-name", "missing-return", "cast-local-type", "deprecated", ], } } ```