Skip to content

Commit

Permalink
fix: bad deprecation message
Browse files Browse the repository at this point in the history
Fixes #965
  • Loading branch information
lewis6991 committed Apr 2, 2024
1 parent 070875f commit a4db718
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 1 addition & 2 deletions doc/gitsigns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,7 @@ trouble *gitsigns-config-trouble*

yadm *gitsigns-config-yadm*
DEPRECATED

Please instead use |gitsigns-config-on_attach_pre|.
Please use |gitsigns-config-on_attach_pre| instead

Type: `table`
Default: >
Expand Down
16 changes: 14 additions & 2 deletions lua/gitsigns/config.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
--- @class (exact) Gitsigns.SchemaElem.Deprecated
---
--- Used for renaming fields.
--- @field new_field string
---
--- Documentation for deprecation. Will be added to the help file and used in
--- the notification if `hard = true`.
--- @field message string
---
--- Emit a message via vim.notify
--- @field hard boolean

--- @class (exact) Gitsigns.SchemaElem
--- @field type string|string[]
--- @field refresh? fun(cb: fun()) Function to refresh the config value
--- @field deep_extend? boolean
--- @field default any
--- @field deprecated? boolean|{new_field:string,message:string,hard:boolean}
--- @field deprecated? boolean|Gitsigns.SchemaElem.Deprecated
--- @field default_help? string
--- @field description string

Expand Down Expand Up @@ -752,7 +764,7 @@ M.schema = {
yadm = {
type = 'table',
deprecated = {
new_field = 'on_attach_pre',
message = 'Please use |gitsigns-config-on_attach_pre| instead',
},
default = { enable = false },
description = [[
Expand Down

0 comments on commit a4db718

Please sign in to comment.