Expand description
§LSP (Language Server Protocol) 模块
完整的 LSP 客户端实现,支持多种语言服务器。
§支持的语言服务器
- rust-analyzer (Rust)
- pyright/pylance (Python)
- typescript-language-server (TypeScript/JavaScript)
- gopls (Go)
- clangd (C/C++)
§支持的功能
- go_to_definition: 跳转到定义(跨模块)
- find_references: 查找引用(项目级)
- get_hover: 获取类型信息
- rename_symbol: 重命名符号(重构)
- get_document_symbols: 获取文档符号
- get_workspace_symbols: 获取工作区符号
- get_code_actions: 获取代码操作(快速修复)
- get_signature_help: 获取签名帮助
- get_completions: 获取代码补全
- format_document: 格式化文档
Re-exports§
pub use client::LspClient;pub use client::SyncLspClient;pub use protocol::create_code_action_request;pub use protocol::create_completion_request;pub use protocol::create_definition_request;pub use protocol::create_did_change_notification;pub use protocol::create_did_close_notification;pub use protocol::create_did_open_notification;pub use protocol::create_document_highlight_request;pub use protocol::create_document_symbol_request;pub use protocol::create_formatting_request;pub use protocol::create_hover_request;pub use protocol::create_initialize_request;pub use protocol::create_references_request;pub use protocol::create_rename_request;pub use protocol::create_signature_help_request;pub use protocol::create_workspace_symbol_request;pub use protocol::LspMessage;pub use protocol::LspNotification;pub use protocol::LspRequest;pub use protocol::LspResponse;pub use server::clangd_config;pub use server::gopls_config;pub use server::pylance_config;pub use server::pyright_config;pub use server::rust_analyzer_config;pub use server::typescript_config;pub use server::LanguageServer;pub use server::LanguageServerConfig;pub use server::LanguageServerManager;pub use types::*;
Modules§
Enums§
- LspError
- LSP 错误类型
Type Aliases§
- LspResult
- LSP 结果类型