Skip to content

Commit bc1f3d6

Browse files
Copilotobserverw
andcommitted
Rename TsserverClient to TypescriptClient and TsserverLocalServer to TypescriptServer
Co-authored-by: observerw <[email protected]>
1 parent 061a1eb commit bc1f3d6

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ if __name__ == "__main__":
8888

8989
The 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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
import anyio
1212

1313
from 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

1717
async 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

src/lsp_client/clients/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
from .pyrefly import PyreflyClient
77
from .pyright import PyrightClient
88
from .rust_analyzer import RustAnalyzerClient
9-
from .tsserver import TsserverClient
9+
from .typescript import TypescriptClient
1010

1111
clients: Final = (
1212
DenoClient,
1313
PyreflyClient,
1414
PyrightClient,
1515
RustAnalyzerClient,
16-
TsserverClient,
16+
TypescriptClient,
1717
)
1818

1919
PythonClient = PyrightClient
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
from lsp_client.server.local import LocalServer
2828
from 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,

0 commit comments

Comments
 (0)