Skip to content

Commit

Permalink
feat(config): improve deprecation message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lewis6991 committed Jun 25, 2024
1 parent d0db8ef commit fa42613
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/gitsigns/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa42613

Please sign in to comment.