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
17
flake.lock
17
flake.lock
|
@ -1,5 +1,21 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"advanced-git-search-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1677794481,
|
||||||
|
"narHash": "sha256-7G0WNcaIH1/4Zs4282UdWfRExdlAz6AHzqBlSu/qioQ=",
|
||||||
|
"owner": "aaronhallaert",
|
||||||
|
"repo": "advanced-git-search.nvim",
|
||||||
|
"rev": "e36797ade1af3d0404e14db83fd09db4e619e8dc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "aaronhallaert",
|
||||||
|
"repo": "advanced-git-search.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"agenix": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
|
@ -840,6 +856,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"advanced-git-search-nvim": "advanced-git-search-nvim",
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"arkenfox-userjs": "arkenfox-userjs",
|
"arkenfox-userjs": "arkenfox-userjs",
|
||||||
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
||||||
|
|
|
@ -87,6 +87,11 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
advanced-git-search-nvim = {
|
||||||
|
url = "github:aaronhallaert/advanced-git-search.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
attic = {
|
attic = {
|
||||||
url = "github:zhaofengli/attic";
|
url = "github:zhaofengli/attic";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
@ -76,6 +76,7 @@ in
|
||||||
plenary-nvim
|
plenary-nvim
|
||||||
popup-nvim
|
popup-nvim
|
||||||
promise-async
|
promise-async
|
||||||
|
vim-fugitive
|
||||||
vim-lion
|
vim-lion
|
||||||
] ++ pluginsWithConfig;
|
] ++ 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>" })
|
|
@ -25,5 +25,11 @@ with lib.my;
|
||||||
version = mkVersionInput inputs.lspsaga-nvim;
|
version = mkVersionInput inputs.lspsaga-nvim;
|
||||||
src = inputs.lspsaga-nvim;
|
src = inputs.lspsaga-nvim;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
advanced-git-search-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "advanced-git-search-nvim";
|
||||||
|
version = mkVersionInput inputs.advanced-git-search-nvim;
|
||||||
|
src = inputs.advanced-git-search-nvim;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue