simvx.core.lsp.client

LSP client using ShellNode for subprocess management.

This is the core (IDE-independent) LSP client. It communicates with a language server via JSON-RPC over stdin/stdout and emits signals with parsed results. Subclass and override _handle_* methods to route results to application state.

Module Contents

Classes

LSPClient

Language Server Protocol client communicating via ShellNode stdin/stdout.

Data

log

API

simvx.core.lsp.client.log

‘getLogger(…)’

class simvx.core.lsp.client.LSPClient(command: str = 'pylsp', args: list[str] | None = None, env: dict[str, str] | None = None, root_path: str | None = None)[source]

Language Server Protocol client communicating via ShellNode stdin/stdout.

Emits signals for LSP events. Subclass and override _handle_* methods to integrate with application-specific state objects.

Initialization

start()[source]
stop()[source]
poll()[source]

Must be called each frame to drive ShellNode I/O.

notify_open(path: str, text: str, language_id: str = 'python')[source]
notify_close(path: str)[source]
notify_save(path: str, text: str | None = None)[source]
notify_change(path: str, text: str, version: int | None = None)[source]
request_completion(path: str, line: int, col: int)[source]
request_definition(path: str, line: int, col: int)[source]
request_hover(path: str, line: int, col: int)[source]
request_references(path: str, line: int, col: int)[source]
request_rename(path: str, line: int, col: int, new_name: str)[source]
request_formatting(path: str, tab_size: int = 4, insert_spaces: bool = True)[source]