enhance git

This commit is contained in:
Tigor Hutasuhut 2024-07-18 10:46:07 +07:00
parent 264da67c32
commit c2252ed93a
3 changed files with 51 additions and 7 deletions

View file

@ -2,6 +2,7 @@
"LazyVim": { "branch": "main", "commit": "b20be638b3563cce0823b161a909f7702aaa64b5" }, "LazyVim": { "branch": "main", "commit": "b20be638b3563cce0823b161a909f7702aaa64b5" },
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" }, "LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"SchemaStore.nvim": { "branch": "main", "commit": "82db29c48789e6b61bd2ba78df8ffd7bf66470d9" }, "SchemaStore.nvim": { "branch": "main", "commit": "82db29c48789e6b61bd2ba78df8ffd7bf66470d9" },
"advanced-git-search.nvim": { "branch": "main", "commit": "198cc402af1790ab26830fdbf24a28c336a20ba6" },
"arrow.nvim": { "branch": "master", "commit": "0b0191d967d9fd837a850f2ccaa95d5917239404" }, "arrow.nvim": { "branch": "master", "commit": "0b0191d967d9fd837a850f2ccaa95d5917239404" },
"before.nvim": { "branch": "master", "commit": "42294a3ba5dc02d3f3a9fe4e9a033ef29da6dcc6" }, "before.nvim": { "branch": "master", "commit": "42294a3ba5dc02d3f3a9fe4e9a033ef29da6dcc6" },
"bufferline.nvim": { "branch": "main", "commit": "aa16dafdc642594c7ade7e88d31a6119feb189d6" }, "bufferline.nvim": { "branch": "main", "commit": "aa16dafdc642594c7ade7e88d31a6119feb189d6" },
@ -19,6 +20,7 @@
"crates.nvim": { "branch": "main", "commit": "c3fd47391de6999f4c939af89494d08443f71916" }, "crates.nvim": { "branch": "main", "commit": "c3fd47391de6999f4c939af89494d08443f71916" },
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, "dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
"diagflow.nvim": { "branch": "main", "commit": "8055067493276dfcc720cd79ebfa481d24192926" }, "diagflow.nvim": { "branch": "main", "commit": "8055067493276dfcc720cd79ebfa481d24192926" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"flash.nvim": { "branch": "main", "commit": "d0799ae43a581d9f190e182e2a1f389d2887c42a" }, "flash.nvim": { "branch": "main", "commit": "d0799ae43a581d9f190e182e2a1f389d2887c42a" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
@ -87,7 +89,9 @@
"trouble.nvim": { "branch": "main", "commit": "2946ce52869d3121637b962c31b1aab48d74a3c9" }, "trouble.nvim": { "branch": "main", "commit": "2946ce52869d3121637b962c31b1aab48d74a3c9" },
"ts-comments.nvim": { "branch": "main", "commit": "8504d06d4f02e7ca6e65c635cef881cefba573d5" }, "ts-comments.nvim": { "branch": "main", "commit": "8504d06d4f02e7ca6e65c635cef881cefba573d5" },
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" }, "vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
"vim-fugitive": { "branch": "master", "commit": "8c8cdf4405cb8bdb70dd9812a33bb52363a87dbc" },
"vim-http": { "branch": "master", "commit": "7eb78e9753c10ca696d80a2668831bdd2aa08a92" }, "vim-http": { "branch": "master", "commit": "7eb78e9753c10ca696d80a2668831bdd2aa08a92" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vim-test": { "branch": "master", "commit": "34aab77f7a63f20a623df45684156915f6182a55" }, "vim-test": { "branch": "master", "commit": "34aab77f7a63f20a623df45684156915f6182a55" },
"which-key.nvim": { "branch": "main", "commit": "f0e99d48f33193526fe66e699174670d5856b6b8" }, "which-key.nvim": { "branch": "main", "commit": "f0e99d48f33193526fe66e699174670d5856b6b8" },
"yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" } "yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" }

46
lua/plugins/git.lua Normal file
View file

@ -0,0 +1,46 @@
return {
{
"lewis6991/gitsigns.nvim",
opts = {
current_line_blame = true,
},
},
{
"aaronhallaert/advanced-git-search.nvim",
cmd = { "AdvancedGitSearch" },
keys = {
{ "ghh", "<cmd>AdvancedGitSearch search_log_content_file<cr>", desc = "Git File History" },
{ "gh", "<cmd>AdvancedGitSearch<cr>", desc = "Advanced Git Search" },
{ "ghH", "<cmd>AdvancedGitSearch<cr>", desc = "Advanced Git Search" },
{
"ghl",
"<cmd>AdvancedGitSearch diff_commit_line<cr>",
desc = "Search Commits affecting line",
mode = { "v" },
},
},
config = function()
-- optional: setup telescope before loading the extension
require("telescope").setup {
-- move this to the place where you call the telescope setup function
extensions = {
advanced_git_search = {
-- See Config
},
},
}
require("telescope").load_extension "advanced_git_search"
end,
dependencies = {
"nvim-telescope/telescope.nvim",
-- to show diff splits and open commits in browser
"tpope/vim-fugitive",
-- to open commits in browser with fugitive
"tpope/vim-rhubarb",
-- optional: to replace the diff from fugitive with diffview.nvim
-- (fugitive is still needed to open in browser)
"sindrets/diffview.nvim",
},
},
}

View file

@ -1,6 +0,0 @@
return {
"lewis6991/gitsigns.nvim",
opts = {
current_line_blame = true,
},
}