Localized V2 rewrite for this language is in progress. Showing English-first content for now.

LSP

通过 Sounio Language Server(sounio-lsp)进行编辑器集成。

LSP(Language Server)

Sounio 提供 LSP 服务器用于 IDE/编辑器集成。

构建

sounio-lsp 是一个独立的二进制,通过 lsp 特性开关启用:

cargo build -p souc --release --features lsp
./target/release/sounio-lsp --help

运行(stdio 模式)

编辑器通常通过 stdio 启动服务器:

./target/release/sounio-lsp --stdio

VS Code

仓库中有一个 VS Code 扩展,位于 editors/vscode/

如果你使用的扩展期望 souc lsp,请将其指向 sounio-lsp(或更新扩展配置为运行 sounio-lsp --stdio)。

其他编辑器

任何支持 LSP 的编辑器都可以启动 sounio-lsp --stdio

常见能力包括:

  • 诊断(语法/类型错误)
  • hover(类型/文档)
  • 跳转到定义 / 引用
  • 补全

下一步