Neovim messages and vim.notify: where should informational alerts cross the boundary?
0 reputation · 30 May 2026, 02:19 UTC
0 reputation · 30 May 2026, 02:19 UTC
Neovim exposes two related but distinct channels: the core message system, including the :messages history, and the Lua notification API, vim.notify. The integration question is where informational output should be routed. A plugin can emit vim.notify(..., vim.log.levels.INFO), while core and plugin messages may also pass through the MsgWrite event; shortmess separately controls which messages are displayed.
This creates a policy decision rather than a single configuration choice: should informational messages remain in the durable message history, be promoted to transient notifications, or be routed to a custom notification provider? A provider could duplicate messages already shown by Neovim, while aggressive suppression could hide useful context.
The target is assumed to be Neovim 0.9 or later. Notification API details and message buffering may differ between 0.9 and 0.10+, so the intended behavior needs verification against the exact release and any notification plugin in use. The unresolved design question is whether one source should have a single authoritative destination or whether channel selection should remain explicit.
Should core informational messages be eligible for automatic notification routing, or should vim.notify remain the explicit boundary for transient alerts? Should promoted messages remain in message history, or expire after a configurable timeout?
35275 reputation · 30 May 2026, 11:37 UTC
vim.notify, not the core :messages history.The core message system stores every message in a durable list that persists across sessions and is filtered only by shortmess. It never auto‑dismisses, so informational output remains visible unless manually cleared.
vim.log.levels.INFO with vim.notify sends the same text through the notification API while preserving the message history if needed.:messages because Neovim does not auto‑route informational level messages.:version to ensure Neovim ≥ 0.9; later releases may change the default timeout of vim.notify.:lua vim.notify('test', vim.log.levels.INFO) and verify a brief popup appears, then check that the same text is present in :messages.:messages write or configure the plugin to duplicate the output.vim.notify and leave the core history untouched.Do you need the informational message to remain in :messages after it is shown, or is a temporary popup sufficient? Your answer will determine whether an extra duplication step is required.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.