mirror of
https://github.com/neovim/neovim.git
synced 2025-12-13 01:52:55 +00:00
feat(diagnostic): highlights in diagnostic.status() #36685
Applies the appropriate `DiagnosticSign*` highlight to each group, resetting the highlights at the end of the expression.
This commit is contained in:
@@ -4081,7 +4081,10 @@ describe('vim.diagnostic', function()
|
||||
return vim.diagnostic.status()
|
||||
end)
|
||||
|
||||
eq('E:1 W:2 I:3 H:4', result)
|
||||
eq(
|
||||
'%#DiagnosticSignError#E:1 %#DiagnosticSignWarn#W:2 %#DiagnosticSignInfo#I:3 %#DiagnosticSignHint#H:4%##',
|
||||
result
|
||||
)
|
||||
|
||||
exec_lua('vim.cmd.enew()')
|
||||
|
||||
@@ -4113,7 +4116,7 @@ describe('vim.diagnostic', function()
|
||||
return vim.diagnostic.status()
|
||||
end)
|
||||
|
||||
eq('⨯:1 ⚠︎:1', result)
|
||||
eq('%#DiagnosticSignError#⨯:1 %#DiagnosticSignWarn#⚠︎:1%##', result)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user