kickstart.nvim
kickstart.nvim copied to clipboard
`gitsigns.preview_hunk_inline` is not drop-in-place replacement for `gitsigns.toggle_deleted`
In #1321 (#1319), deprecated gitsigns.toggle_deleted function in <leader>tD keymap was replaced by gitsigns.preview_hunk_inline, which is the function to which author of the gitsigns point as a replacement, but it doesn't make a lot of sense to use it in the same way with the same keymap and description.
@@ -54,7 +54,7 @@
- map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
+ map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
- It is not a toggle, it's a preview, which goes away on any key press.
- It is just the other style of
gitsings.preview_hunk, which already has its own keymap defined (<leader>hp).
Unfortunately, there is no good replacement for original feature.
Visible resolutions:
- Leave this function in, change keymap to something like
<leader>hPor<leader>hi, update keymap order anddescto match this change. - Delete this function, optionally leave a comment about possibility of replacing
gitsigns.preview_hunkwithgitsigns.preview_hunk_inline.
Not a PR yet, but an issue. I think there a need to discuss how this should be fixed.
IMO, we should remove <leader>tD mapping.
The reason is:
- It is no more a toggle at all due to the break change in gitsigns.
- The author of gitsigns removed the mapping.