|
2 | 2 |
|
3 | 3 | [](https://python.org) |
4 | 4 | [](LICENSE) |
| 5 | +[](https://observerw.github.io/lsp-client/) |
5 | 6 | [](https://deepwiki.com/observerw/lsp-client) |
6 | 7 |
|
7 | | -A full-featured, well-typed, and easy-to-use Python client for the Language Server Protocol (LSP). This library provides a clean, async-first interface for interacting with language servers, supporting both local and Docker-based runtimes. |
| 8 | +A full-featured, well-typed, and easy-to-use Python client for the Language Server Protocol (LSP). This library provides a clean, async-first interface for interacting with language servers, supporting both local and container-based runtimes. |
8 | 9 |
|
9 | 10 | ## Why lsp-client? |
10 | 11 |
|
11 | 12 | `lsp-client` is designed specifically for developers who need **high control**, **isolation**, and **extensibility**: |
12 | 13 |
|
13 | | -- **🐳 Native Docker Support**: Unlike other clients that focus on local process management, `lsp-client` treats Docker as a first-class citizen. It handles the "magic" of mounting workspaces, translating file paths between your host and the container, and managing container lifecycles. |
| 14 | +- **🐳 Native Container Support**: Unlike other clients that focus on local process management, `lsp-client` treats containers as a first-class citizen. It handles the "magic" of mounting workspaces, translating file paths between your host and the container, and managing container lifecycles. Pre-built containers are available for all supported language servers. |
14 | 15 | - **🧩 SDK for Custom Tooling**: Instead of being a closed wrapper, this is a true SDK. Our **Modular Capability System** allows you to build custom clients by mixing and matching only the LSP features you need, or even adding your own protocol extensions seamlessly. |
15 | | -- **🛠️ Explicit over Implicit**: We prioritize predictable environments. While other tools might auto-download binaries, `lsp-client` gives you full control over your server environment (Local or Docker), making it ideal for production-grade tools where version pinning is critical. |
| 16 | +- **🛠️ Explicit over Implicit**: We prioritize predictable environments. While other tools might auto-download binaries, `lsp-client` gives you full control over your server environment (Local or Container), making it ideal for production-grade tools where version pinning is critical. |
16 | 17 | - **⚡ Modern Async-First Architecture**: Built from the ground up for Python 3.12+, utilizing advanced async patterns to ensure high-performance concurrent operations without blocking your main event loop. |
17 | 18 |
|
18 | 19 | ## Features |
19 | 20 |
|
20 | | -- **🚀 Environment Agnostic**: Seamlessly switch between local processes and isolated Docker containers. |
| 21 | +- **🚀 Environment Agnostic**: Seamlessly switch between local processes and isolated containers. |
21 | 22 | - **🔧 Full LSP 3.17 Support**: Comprehensive implementation of the latest protocol specification. |
22 | 23 | - **🎯 Specialized Clients**: Out-of-the-box support for popular servers (Pyright, Deno, Rust-Analyzer, etc.). |
23 | 24 | - **📝 Zero-Config Capabilities**: Automatically manages complex protocol handshakes and feature negotiations. |
@@ -63,7 +64,7 @@ if __name__ == "__main__": |
63 | 64 | anyio.run(main) |
64 | 65 | ``` |
65 | 66 |
|
66 | | -### Docker-based Language Server |
| 67 | +### Container-based Language Server |
67 | 68 |
|
68 | 69 | ```python |
69 | 70 | from pathlib import Path |
@@ -98,13 +99,15 @@ if __name__ == "__main__": |
98 | 99 |
|
99 | 100 | The library includes pre-configured clients for popular language servers: |
100 | 101 |
|
101 | | -| Language Server | Module Path | Language | |
102 | | -| -------------------------- | ---------------------------------- | --------------------- | |
103 | | -| Pyright | `lsp_client.clients.pyright` | Python | |
104 | | -| Pyrefly | `lsp_client.clients.pyrefly` | Python | |
105 | | -| Rust Analyzer | `lsp_client.clients.rust_analyzer` | Rust | |
106 | | -| Deno | `lsp_client.clients.deno` | TypeScript/JavaScript | |
107 | | -| TypeScript Language Server | `lsp_client.clients.typescript` | TypeScript/JavaScript | |
| 102 | +| Language Server | Module Path | Language | Container Image | |
| 103 | +| -------------------------- | ---------------------------------- | --------------------- | ---------------------------------------- | |
| 104 | +| Pyright | `lsp_client.clients.pyright` | Python | `ghcr.io/observerw/lsp-client/pyright` | |
| 105 | +| Pyrefly | `lsp_client.clients.pyrefly` | Python | `ghcr.io/observerw/lsp-client/pyrefly` | |
| 106 | +| Rust Analyzer | `lsp_client.clients.rust_analyzer` | Rust | `ghcr.io/observerw/lsp-client/rust-analyzer` | |
| 107 | +| Deno | `lsp_client.clients.deno` | TypeScript/JavaScript | `ghcr.io/observerw/lsp-client/deno` | |
| 108 | +| TypeScript Language Server | `lsp_client.clients.typescript` | TypeScript/JavaScript | `ghcr.io/observerw/lsp-client/typescript` | |
| 109 | + |
| 110 | +Containers are automatically updated weekly to ensure you always have the latest versions. |
108 | 111 |
|
109 | 112 | ## Contributing |
110 | 113 |
|
|
0 commit comments