man y git things added
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" },
|
"blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" },
|
||||||
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
|
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
|
||||||
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||||
"github-nvim-theme": { "branch": "main", "commit": "c106c9472154d6b2c74b74565616b877ae8ed31d" },
|
"github-nvim-theme": { "branch": "main", "commit": "c106c9472154d6b2c74b74565616b877ae8ed31d" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
"mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" },
|
"mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
|
"neo-tree.nvim": { "branch": "main", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "bbe36f4d60ed096282f564ddae4e781e420a8270" },
|
"neoconf.nvim": { "branch": "main", "commit": "bbe36f4d60ed096282f564ddae4e781e420a8270" },
|
||||||
|
"neogit": { "branch": "master", "commit": "395ac481e197784e410b59b987fadaf9e7481df1" },
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "3c206dfedf5f1385e9d29f85ffaec7874358592a" },
|
"none-ls.nvim": { "branch": "main", "commit": "3c206dfedf5f1385e9d29f85ffaec7874358592a" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"AstroNvim/astrocommunity",
|
"AstroNvim/astrocommunity",
|
||||||
{ import = "astrocommunity.colorscheme.github-nvim-theme" },
|
{ import = "astrocommunity.colorscheme.github-nvim-theme" },
|
||||||
|
{ import = "astrocommunity.git.neogit" },
|
||||||
|
{ import = "astrocommunity.git.diffview-nvim" },
|
||||||
{ import = "astrocommunity.markdown-and-latex.vimtex" },
|
{ import = "astrocommunity.markdown-and-latex.vimtex" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"AstroNvim/astrocore",
|
||||||
|
opts = function(_, opts)
|
||||||
|
local maps = opts.mappings
|
||||||
|
maps.n = maps.n or {}
|
||||||
|
maps.x = maps.x or {}
|
||||||
|
|
||||||
|
-- Keep <leader>g focused on repo UI, while hunk actions stay buffer-local in gitsigns.
|
||||||
|
maps.n["<Leader>g"] = { desc = "Git" }
|
||||||
|
|
||||||
|
maps.n["<Leader>gg"] = false
|
||||||
|
maps.n["<Leader>gb"] = false
|
||||||
|
maps.n["<Leader>gc"] = false
|
||||||
|
maps.n["<Leader>gC"] = false
|
||||||
|
maps.n["<Leader>gt"] = false
|
||||||
|
maps.n["<Leader>gT"] = false
|
||||||
|
maps.n["<Leader>go"] = false
|
||||||
|
maps.x["<Leader>go"] = false
|
||||||
|
|
||||||
|
maps.n["<Leader>gn"] = false
|
||||||
|
maps.n["<Leader>gnt"] = false
|
||||||
|
maps.n["<Leader>gnc"] = false
|
||||||
|
maps.n["<Leader>gnd"] = false
|
||||||
|
maps.n["<Leader>gnk"] = false
|
||||||
|
maps.n["<Leader>gnf"] = false
|
||||||
|
maps.n["<Leader>gnh"] = false
|
||||||
|
maps.n["<Leader>gnv"] = false
|
||||||
|
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"NeogitOrg/neogit",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>gg", "<Cmd>Neogit<CR>", desc = "Git status" },
|
||||||
|
{ "<leader>gb", "<Cmd>Neogit branch<CR>", desc = "Git branches" },
|
||||||
|
{ "<leader>gc", "<Cmd>Neogit commit<CR>", desc = "Git commit" },
|
||||||
|
{ "<leader>gs", "<Cmd>Neogit stash<CR>", desc = "Git stash" },
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.integrations = opts.integrations or {}
|
||||||
|
opts.integrations.diffview = true
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewFileHistory" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>gd", "<Cmd>DiffviewOpen<CR>", desc = "Git diff" },
|
||||||
|
{ "<leader>gD", "<Cmd>DiffviewClose<CR>", desc = "Git diff close" },
|
||||||
|
{ "<leader>gh", "<Cmd>DiffviewFileHistory %<CR>", desc = "Git history (file)" },
|
||||||
|
{ "<leader>gH", "<Cmd>DiffviewFileHistory<CR>", desc = "Git history (repo)" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- Gitsigns owns only in-buffer hunk work, so its maps stay local and minimal.
|
||||||
|
opts.on_attach = function(bufnr)
|
||||||
|
local gitsigns = require "gitsigns"
|
||||||
|
local map = function(lhs, rhs, desc)
|
||||||
|
vim.keymap.set("n", lhs, rhs, { buffer = bufnr, desc = desc })
|
||||||
|
end
|
||||||
|
|
||||||
|
map("<Leader>gl", gitsigns.blame_line, "View Git blame")
|
||||||
|
map("<Leader>gp", gitsigns.preview_hunk, "Preview Git hunk")
|
||||||
|
map("]h", function() gitsigns.nav_hunk "next" end, "Next Git hunk")
|
||||||
|
map("[h", function() gitsigns.nav_hunk "prev" end, "Previous Git hunk")
|
||||||
|
end
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user