feat(config): improve deprecation message

There are Neovim users who don't know how to configure highlights.
Adjust the deprecation message to include an example of how to set a
highlight.
This commit is contained in:
Lewis Russell 2024-06-25 12:00:05 +01:00
parent d0db8ef6a0
commit fa42613096

View file

@ -183,10 +183,13 @@ local function validate_signs(x)
if x[kind] and x[kind][ty] and vim.endswith(ty, 'hl') then
warnings = warnings or {}
local w = string.format(
"'signs.%s.%s' is now deprecated, please define highlight '%s'",
"'signs.%s.%s' is now deprecated, please define highlight '%s' e.g:\n"
.. " vim.api.nvim_set_hl(0, '%s', { link = '%s' })",
kind,
ty,
v
v,
v,
x[kind][ty]
)
warnings[w] = true
end