From f54f566bf830c666347d8f7b3dfa291c2ea79f1a Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Wed, 6 May 2026 19:01:21 +0800 Subject: [PATCH] feat(diagnostic)!: deprecate `format` as a table --- runtime/doc/news.txt | 2 ++ test/functional/lua/diagnostic_spec.lua | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 1cd80711c5..93468a510a 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -28,6 +28,8 @@ DIAGNOSTICS (deprecated in Nvim 0.10 |deprecated-0.10|). • The legacy signature of |vim.diagnostic.enable()| (deprecated in Nvim 0.10 |deprecated-0.10|) is no longer supported. +• `vim.diagnostic.Opts.Status.format` no longer accepts the table mapping + from severity to text. Use `vim.diagnostic.Opts.Signs.text` instead. EDITOR diff --git a/test/functional/lua/diagnostic_spec.lua b/test/functional/lua/diagnostic_spec.lua index d6c59ac6da..8d2b2b0988 100644 --- a/test/functional/lua/diagnostic_spec.lua +++ b/test/functional/lua/diagnostic_spec.lua @@ -4219,11 +4219,11 @@ describe('vim.diagnostic', function() ) end) - it('uses text from diagnostic.config().status.format[severity]', function() + it('uses text from diagnostic.config().signs.text[severity]', function() local result = exec_lua(function() vim.diagnostic.config({ - status = { - format = { + signs = { + text = { [vim.diagnostic.severity.ERROR] = '⨯', [vim.diagnostic.severity.WARN] = '⚠︎', },