Skip to main content

Module statusline

Module statusline 

Source
Expand description

Status line (diagnostics summary). Statusline drawing helpers with diagnostics and Git change aggregation.

StructsΒ§

CachedGitStats πŸ”’
Cached Git statistics keyed by the active buffer and repository discovery path.
Diagnostic
Diagnostic emitted by Nvim for statusline aggregation.
GitLineStats πŸ”’
Added and removed tracked lines for one status-line scope.
GitStats πŸ”’
Git line statistics for the whole repository and the active buffer.
SeverityBuckets πŸ”’
Fixed-size aggregation of counts per DiagnosticSeverity.
Statusline πŸ”’
Represents the status line with buffer path, diagnostics, and Git statistics.

ConstantsΒ§

CACHED_BUFFER_PATH πŸ”’
Cached (buffer_handle, relative_path) to avoid recomputing the buffer path on every CursorMoved event. Automatically invalidated when the active buffer handle changes (e.g. on BufEnter).
CACHED_GIT_STATS πŸ”’
Cached Git statistics for the active buffer or current working directory.
DRAW_TRIGGERS πŸ”’
GIT_ADDED_HIGHLIGHT πŸ”’
GIT_REMOVED_HIGHLIGHT πŸ”’

FunctionsΒ§

dict
[Dictionary] exposing statusline draw helpers.
draw πŸ”’
Draws the status line with diagnostic and Git change information.
get_current_working_directory πŸ”’
Retrieves Neovim’s current working directory for Git discovery without a named buffer.
get_git_stats πŸ”’
Retrieves Git statistics for the active buffer, or the current working directory when unnamed.
invalidate_git_stats πŸ”’
Invalidates cached Git statistics so the next draw reads the repository again.
write_diagnostics πŸ”’
Writes the diagnostic count directly to the target string, avoiding intermediate allocation.