-
Notifications
You must be signed in to change notification settings - Fork 0
Tooling Language Server
AuroraScript LSP service
Language Server 是基于 stdio 的 LSP 服务器。它为 .as 文件提供语法与语义诊断、补全、悬停说明、跳转定义、引用、重命名、格式化和语义着色;具体客户端是否显示某项能力取决于该客户端的 LSP 支持。
The language server is a stdio-based LSP server. It provides syntax and semantic diagnostics, completion, hover documentation, go-to-definition, references, rename, formatting, and semantic highlighting for
.asfiles. Whether a client exposes a feature depends on that client's LSP support.
项目当前将 Language Server 作为 Visual Studio 扩展的一部分发布。若自行集成,请使用已构建的可执行文件作为 stdio server,不要向它写入非 LSP 的日志文本。
The project currently ships the language server as part of the Visual Studio extension. For custom integration, run the built executable as a stdio server and do not write non-LSP log text to its standard output.
dotnet run --project language-tools/AuroraScript.LanguageServer/AuroraScript.LanguageServer.csproj服务器将已打开文件和工作区内的 .as 文件建立索引。@global(); 声明文件用于提供宿主全局符号的诊断、补全和跳转;它们不是可导入模块。
The server indexes open files and workspace
.asfiles.@global();declaration files supply diagnostics, completion, and navigation for host globals; they are not importable modules.
@global();
declare func HOST_ADD(left, right);
declare const HOST_NAME;- 诊断:打开含错误的
.as文件,让客户端显示诊断。 - 补全:在
Array.后请求补全。 - 悬停:悬停
Path.join查看签名与说明。 - 定义跳转:在
import名称或函数调用上跳转。 - 格式化:调用客户端的 Format Document 命令。
- Diagnostics: open an invalid
.asfile and let the client show diagnostics.- Completion: request completion after
Array..- Hover: hover
Path.joinfor its signature and description.- Definition: go to definition from an import name or function call.
- Formatting: invoke the client's Format Document command.
相关页面:语言指南、脚本 API、Visual Studio 扩展。
Related pages: Language Guide, Script API, and Visual Studio extension.
AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License