File tree Expand file tree Collapse file tree 4 files changed +16
-16
lines changed
Expand file tree Collapse file tree 4 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,13 @@ if __name__ == "__main__":
8888
8989The library includes pre-configured clients for popular language servers:
9090
91- | Language Server | Module Path | Language |
92- | ---------------------------- | ---------------------------------- | --------------------- |
93- | Pyright | ` lsp_client.clients.pyright ` | Python |
94- | Pyrefly | ` lsp_client.clients.pyrefly ` | Python |
95- | Rust Analyzer | ` lsp_client.clients.rust_analyzer ` | Rust |
96- | Deno | ` lsp_client.clients.deno ` | TypeScript/JavaScript |
97- | TypeScript Language Server | ` lsp_client.clients.tsserver ` | TypeScript/JavaScript |
91+ | Language Server | Module Path | Language |
92+ | ---------------------------- | ------------------------------------ | --------------------- |
93+ | Pyright | ` lsp_client.clients.pyright ` | Python |
94+ | Pyrefly | ` lsp_client.clients.pyrefly ` | Python |
95+ | Rust Analyzer | ` lsp_client.clients.rust_analyzer ` | Rust |
96+ | Deno | ` lsp_client.clients.deno ` | TypeScript/JavaScript |
97+ | TypeScript Language Server | ` lsp_client.clients.typescript ` | TypeScript/JavaScript |
9898
9999## Contributing
100100
Original file line number Diff line number Diff line change 1111import anyio
1212
1313from lsp_client import Position # noqa: F401 - Used in commented example code
14- from lsp_client .clients .tsserver import TsserverClient , TsserverLocalServer
14+ from lsp_client .clients .typescript import TypescriptClient , TypescriptServer
1515
1616
1717async def main ():
1818 # Set up workspace directory
1919 workspace = Path .cwd ()
20- async with TsserverClient (
21- server = TsserverLocalServer (),
20+ async with TypescriptClient (
21+ server = TypescriptServer (),
2222 workspace = workspace ,
2323 ) as client :
24- # Example: Find definition of TsserverClient at line 13, column 28
24+ # Example: Find definition of TypescriptClient at line 13, column 28
2525 # This demonstrates the definition lookup capability
2626 print (f"Using language server for: { client .get_language_id ()} " )
2727
Original file line number Diff line number Diff line change 66from .pyrefly import PyreflyClient
77from .pyright import PyrightClient
88from .rust_analyzer import RustAnalyzerClient
9- from .tsserver import TsserverClient
9+ from .typescript import TypescriptClient
1010
1111clients : Final = (
1212 DenoClient ,
1313 PyreflyClient ,
1414 PyrightClient ,
1515 RustAnalyzerClient ,
16- TsserverClient ,
16+ TypescriptClient ,
1717)
1818
1919PythonClient = PyrightClient
Original file line number Diff line number Diff line change 2727from lsp_client .server .local import LocalServer
2828from lsp_client .utils .types import lsp_type
2929
30- TsserverLocalServer = partial (
30+ TypescriptServer = partial (
3131 LocalServer , command = ["typescript-language-server" , "--stdio" ]
3232)
33- TsserverDockerServer = partial (DockerServer , image = "docker.io/lspcontainers/tsserver" )
33+ TypescriptDockerServer = partial (DockerServer , image = "docker.io/lspcontainers/tsserver" )
3434
3535
3636@define
37- class TsserverClient (
37+ class TypescriptClient (
3838 LSPClient ,
3939 WithRequestHover ,
4040 WithRequestDefinition ,
You can’t perform that action at this time.
0 commit comments