feat(nvim): add advanced-git-search-nvim
This commit is contained in:
parent
958e91c836
commit
15558cbc2f
5 changed files with 47 additions and 0 deletions
|
|
@ -76,6 +76,7 @@ in
|
|||
plenary-nvim
|
||||
popup-nvim
|
||||
promise-async
|
||||
vim-fugitive
|
||||
vim-lion
|
||||
] ++ pluginsWithConfig;
|
||||
};
|
||||
|
|
|
|||
18
modules/programs/nvim/plugins/advanced-git-search-nvim.lua
Normal file
18
modules/programs/nvim/plugins/advanced-git-search-nvim.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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>" })
|
||||
Loading…
Add table
Add a link
Reference in a new issue