What it does
lsp
Diagnostics + strict-mode controls embedded in the System Tools
inspector. Reuses the Layer A composite widgets
(LspW.severitySummary, LspW.diagnosticsList,
LspW.diagnosticDetail, LspW.strictModeToggle) so this tab stays
tiny — the data fetch happens through the engine's existing lsp.*
namespace and the visibility-driven refresh scheduler in
system_tools.module gates it on tab-active. Refresh cadence is 1 s,
gated to "tab active and visible".
Exports
M.onMount(_state)— pull diagnostics + strict mode fromlsp.*into the local cache.M.refresh_data(_state)— host scheduler hook; forwards toonMount.M.build(_state) -> any— build the zui widget tree for the tab.M.onCallback(callbackId, data, _state) -> boolean— handle row select, refresh, strict toggle, full-panel button.M.label: string— tab title.M.refresh: number— refresh cadence in seconds (1.0).
Types:
LspSummary = { errors: number, warnings: number, info: number, hints: number, filesChecked: number }LspCache = { diagnostics: { any }, summary: LspSummary, selectedDiag: number?, strictMode: string, lastError: string? }
Usage
local Lsp = require("@builtin::modules.engine.editor.system_tools.tabs.lsp")
Lsp.onMount(state)
local widget = Lsp.build(state)
Lsp.onCallback("syslsp-refresh", nil, state)
Notes
- Errors from
lsp.checkAll/lsp.getStrictMode/lsp.setStrictModeare captured incache.lastErrorand surfaced inline rather than thrown. - The "Open full panel" button mounts the standalone
engine.editor.lsp_uiwindow; its lifecycle is independent of this tab. - The Copy-path button prints to the script log when the host has no clipboard primitive.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.