19 lines
827 B
Lua
19 lines
827 B
Lua
require("telescope").load_extension("advanced_git_search")
|
|
local advanced_git_search = require("telescope").extensions.advanced_git_search
|
|
vim.api.nvim_create_user_command(
|
|
"DiffCommitLine",
|
|
"lua require('telescope').extensions.advanced_git_search.diff_commit_line()",
|
|
{ range = true }
|
|
)
|
|
require("which-key").register({
|
|
g = {
|
|
name = "git",
|
|
b = { advanced_git_search.diff_branch_file, "diff branch file" },
|
|
l = { vim.cmd.DiffCommitLine, "diff commit line", mode = "v" },
|
|
f = { advanced_git_search.diff_commit_file, "diff commit file" },
|
|
c = { advanced_git_search.search_log_content, "search log content" },
|
|
C = { advanced_git_search.search_log_content_file, "search log content current file" },
|
|
r = { advanced_git_search.checkout_reflog, "checkout reflog" },
|
|
},
|
|
}, { prefix = "<leader>" })
|