Module formatter

Module formatter 

Source
Expand description

Diagnostic formatting helpers.

Converts raw LSP diagnostics plus embedded user_data into concise messages with source / code. Missing required fields trigger user notifications and yield None.

Structs§

Diagnostic
Represents a diagnostic from Nvim.
Lsp
LSP data within user data.
LspData
Additional LSP data.
UserData
User data associated with a diagnostic.

Functions§

format
Formats a diagnostic into a human-readable string.
get_code 🔒
Extracts the “code” from Diagnostic::user_data or Diagnostic::code.
get_msg 🔒
Extracts LSP diagnostic message from LspData::rendered or directly from the supplied Diagnostic.
get_src 🔒
Extracts the “source” from Diagnostic::user_data or Diagnostic::source.