raesl.server.server#

Language Server class module.

Module Contents#

Classes#

EslServer

ESL Language Server.

Functions#

did_open(ls, params)

Opened document handling.

did_close(ls, params)

Closed document handling.

did_save(ls, params)

Saved document handling.

did_change_watched(ls, params)

Changed watched files handling.

did_change_config(ls, params)

Config changed handling.

set_trace_notification(ls, *args)

Unkown notification. Probably a config change.

_validate(→ bool)

Validate ESL files on given paths and push diagnostics.

_publish(ls, paths, diag_store)

Publish diagnostics from the Diagnostic Store via the language server.

Attributes#

ls

class raesl.server.server.EslServer#

Bases: pygls.server.LanguageServer

ESL Language Server.

CONFIG = 'esl'#
CMD_COMPILE_PATH = 'esl.compilePath'#
async update_config()#

Handle a config update request.

raesl.server.server.ls#
async raesl.server.server.did_open(ls: EslServer, params: pygls.lsp.DidOpenTextDocumentParams)#

Opened document handling.

async raesl.server.server.did_close(ls: EslServer, params: pygls.lsp.DidCloseTextDocumentParams)#

Closed document handling.

async raesl.server.server.did_save(ls: EslServer, params: pygls.lsp.DidSaveTextDocumentParams)#

Saved document handling.

async raesl.server.server.did_change_watched(ls: EslServer, params: pygls.lsp.DidChangeWatchedFilesParams)#

Changed watched files handling.

async raesl.server.server.did_change_config(ls: EslServer, params: pygls.lsp.DidChangeConfigurationParams)#

Config changed handling.

async raesl.server.server.set_trace_notification(ls: EslServer, *args)#

Unkown notification. Probably a config change.

raesl.server.server._validate(ls: EslServer, paths: List[pathlib.Path] | None = None) bool#

Validate ESL files on given paths and push diagnostics.

raesl.server.server._publish(ls: EslServer, paths: List[pathlib.Path], diag_store: raesl.compile.diagnostics.DiagnosticStore)#

Publish diagnostics from the Diagnostic Store via the language server.