mirror of
https://github.com/neovim/neovim.git
synced 2026-08-30 19:11:52 +00:00
refactor(diagnostic): split diagnostic module
Extract the diagnostic implementation from runtime/lua/vim/diagnostic.lua into focused internal modules covering config, display, float rendering, jump/list helpers, namespace and storage management, severity/shared utilities, and statusline support. Move the builtin handlers into runtime/lua/vim/diagnostic/handlers/ and keep runtime/lua/vim/diagnostic.lua as the public facade that lazily dispatches to the split modules. This preserves the external vim.diagnostic API while making the implementation easier to navigate and reason about. AI-assisted: Codex
This commit is contained in:
committed by
Lewis Russell
parent
9e80f63c30
commit
1f53abf54b
@@ -3492,7 +3492,7 @@ describe('vim.diagnostic', function()
|
||||
)
|
||||
|
||||
eq(
|
||||
'.../diagnostic.lua:0: prefix: expected string|table|function, got number',
|
||||
'.../_float.lua:0: prefix: expected string|table|function, got number',
|
||||
pcall_err(exec_lua, [[ vim.diagnostic.open_float({ prefix = 42 }) ]])
|
||||
)
|
||||
end)
|
||||
@@ -3549,7 +3549,7 @@ describe('vim.diagnostic', function()
|
||||
)
|
||||
|
||||
eq(
|
||||
'.../diagnostic.lua:0: suffix: expected string|table|function, got number',
|
||||
'.../_float.lua:0: suffix: expected string|table|function, got number',
|
||||
pcall_err(exec_lua, [[ vim.diagnostic.open_float({ suffix = 42 }) ]])
|
||||
)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user