feat(diagnostic)!: deprecate format as a table

This commit is contained in:
Yi Ming
2026-05-06 19:01:21 +08:00
committed by Justin M. Keyes
parent 33c6d51167
commit f54f566bf8
2 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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] = '⚠︎',
},