--- title: "Lsp" hideTitleOnPage: true --- ## LspServer ```python class LspServer() ``` Synchronous LspServer. #### LspServer.\_\_init\_\_ ```python def __init__(impl: AsyncLspServer, bridge: SyncBridge) -> None ``` #### LspServer.completions ```python def completions(uri: str, position: LspPosition | Mapping[str, int], *, context: JsonValue | None = None) -> LspCompletionList ``` #### LspServer.did\_close ```python def did_close(uri: str) -> None ``` #### LspServer.did\_open ```python def did_open(uri: str) -> None ``` #### LspServer.document\_symbols ```python def document_symbols(uri: str) -> list[LspSymbol] ``` #### LspServer.stop ```python def stop() -> None ``` #### LspServer.workspace\_symbols ```python def workspace_symbols(query: str) -> list[LspSymbol] ``` ## AsyncLspServer ```python class AsyncLspServer() ``` #### AsyncLspServer.\_\_init\_\_ ```python def __init__(transport: AsyncTransport, language_id: str, path_to_project: str) -> None ``` #### AsyncLspServer.did\_open ```python async def did_open(uri: str) -> None ``` #### AsyncLspServer.did\_close ```python async def did_close(uri: str) -> None ``` #### AsyncLspServer.completions ```python async def completions(uri: str, position: LspPosition | Mapping[str, int], *, context: JsonValue | None = None) -> LspCompletionList ``` #### AsyncLspServer.document\_symbols ```python async def document_symbols(uri: str) -> list[LspSymbol] ``` #### AsyncLspServer.workspace\_symbols ```python async def workspace_symbols(query: str) -> list[LspSymbol] ``` #### AsyncLspServer.stop ```python async def stop() -> None ``` ## LspService ```python class LspService() ``` Synchronous LspService. #### LspService.\_\_init\_\_ ```python def __init__(impl: AsyncLspService, bridge: SyncBridge) -> None ``` #### LspService.start ```python def start(language_id: str, path_to_project: str) -> LspServer ``` ## AsyncLspService ```python class AsyncLspService() ``` #### AsyncLspService.\_\_init\_\_ ```python def __init__(transport: AsyncTransport) -> None ``` #### AsyncLspService.start ```python async def start(language_id: str, path_to_project: str) -> AsyncLspServer ``` ## LspPosition: `TypeAlias` ```python LspPosition = SymbolPosition ``` ## LspRange: `TypeAlias` ```python LspRange = SymbolRange ``` ## LspLocation: `TypeAlias` ```python LspLocation = SymbolLocation ``` ## LspSymbol: `TypeAlias` ```python LspSymbol = SymbolInfo ``` ## LspCompletionItem: `TypeAlias` ```python LspCompletionItem = CompletionItem ``` ## LspCompletionList: `TypeAlias` ```python LspCompletionList = CompletionList ```