feat(hunks)!: highlight inline overlay diffs
BREAKING CHANGE: rename :GitDiffOverlay to :GitHunkOverlay and <Plug>(git-diff-overlay) to <Plug>(git-hunk-overlay).
This commit is contained in:
+8
-7
@@ -241,6 +241,12 @@ end, {
|
||||
desc = "Open git status view",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("GitHunkOverlay", function()
|
||||
require("git.hunks").toggle_overlay()
|
||||
end, {
|
||||
desc = "Toggle the git hunk overlay in the current buffer",
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<Plug>(git-edit)", function()
|
||||
local rev = vim.fn.input("Edit git object: ")
|
||||
if rev == "" then
|
||||
@@ -320,14 +326,9 @@ end, { silent = true, desc = "Preview hunk under cursor" })
|
||||
vim.keymap.set("n", "<Plug>(git-hunk-select)", function()
|
||||
require("git.hunks").select_hunk()
|
||||
end, { silent = true, desc = "Select hunk under cursor" })
|
||||
vim.keymap.set("n", "<Plug>(git-diff-overlay)", function()
|
||||
vim.keymap.set("n", "<Plug>(git-hunk-overlay)", function()
|
||||
require("git.hunks").toggle_overlay()
|
||||
end, { silent = true, desc = "Toggle the git diff overlay" })
|
||||
|
||||
vim.api.nvim_create_user_command("GitDiffOverlay", function()
|
||||
require("git.hunks").toggle_overlay()
|
||||
end, { desc = "Toggle the git diff overlay in the current buffer" })
|
||||
|
||||
end, { silent = true, desc = "Toggle the git hunk overlay" })
|
||||
vim.keymap.set("n", "<Plug>(git-blame-popup)", function()
|
||||
require("git.blame").line_popup()
|
||||
end, { silent = true, desc = "Show git blame for the current line" })
|
||||
|
||||
Reference in New Issue
Block a user