Expand description
Canonical synthetic buffer names for the LSP log family.
Three flavours of LSP-owned Document buffer, one canonical name format each:
*lsp*— subsystem-wide log. Captures every record withserver_id.is_none()(lifecycle, attach driver, supervisor chatter).LSP_SUBSYSTEM_LOG_NAME.*lsp:<server>:<workspace>*— per-instance log. One perInstanceKey, so tworust-analyzeractors on different workspaces get distinct buffers.lsp_server_log_name.*lsp:<server>:<workspace>:trace*— per-instance JSON-RPC wire trace. Mirrors the log buffer but only carriesLogSource::Tracerecords.lsp_server_trace_log_name.
The inverse helpers (parse_lsp_server_log_name,
parse_lsp_trace_log_name) extract the originating
InstanceKey from a synthetic name so a mode can derive
its identity from its buffer’s name alone — no buffer-local
seeding required (B’.7).
§Invariant
Server ids never contain :. The parsers split on the first
colon after *lsp:; everything between that and the trailing
* (or :trace*) is the workspace path. Workspaces with
literal colons in their path (rare on POSIX, non-existent on
Windows drive letters with \\?\C:\… because the registry
normalises) survive because the workspace segment is the
remainder — the parser does not split it further.
Constants§
- LSP_
SUBSYSTEM_ LOG_ NAME - Synthetic name for the subsystem-wide
*lsp*buffer.
Functions§
- lsp_
server_ log_ name - Build the synthetic name for the per-instance LSP log buffer
owned by
crate::modes::LspServerLogMode. - lsp_
server_ trace_ log_ name - Build the synthetic name for the per-instance LSP trace
buffer owned by
crate::modes::LspTraceLogMode. - parse_
lsp_ server_ log_ name - Recover the
InstanceKeyfrom a per-instance log buffer name. ReturnsNonewhennamedoes not match the canonical*lsp:<server>:<workspace>*shape. - parse_
lsp_ trace_ log_ name - Recover the
InstanceKeyfrom a per-instance trace buffer name. ReturnsNonewhennamedoes not match*lsp:<server>:<workspace>:trace*.