nvim,tmux,kitty: full config overhaul (AstroNvim → native 0.12)
Replaces AstroNvim v5 with from-scratch Neovim 0.12 config using vim.lsp.config()/vim.lsp.enable() natively, lazy.nvim, blink.cmp, and smart-splits tmux integration. tmux: new C-Space prefix, hjkl pane nav, resize key table, tpm plugins. kitty: add allow_remote_control for smart-splits.
This commit is contained in:
63
dot_config/nvim/lua/plugins/git.lua
Normal file
63
dot_config/nvim/lua/plugins/git.lua
Normal file
@@ -0,0 +1,63 @@
|
||||
return {
|
||||
-- Gutter signs, hunk navigation, inline blame
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "▎" },
|
||||
change = { text = "▎" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "▎" },
|
||||
untracked = { text = "▎" },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
local map = function(mode, lhs, rhs, desc)
|
||||
vim.keymap.set(mode, lhs, rhs, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map("n", "]h", function()
|
||||
if vim.wo.diff then return "]h" end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return "<Ignore>"
|
||||
end, "Next hunk")
|
||||
map("n", "[h", function()
|
||||
if vim.wo.diff then return "[h" end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return "<Ignore>"
|
||||
end, "Prev hunk")
|
||||
|
||||
-- Actions
|
||||
map("n", "<leader>hs", gs.stage_hunk, "Stage hunk")
|
||||
map("n", "<leader>gu", gs.undo_stage_hunk, "Undo stage hunk")
|
||||
map("n", "<leader>gh", gs.preview_hunk, "Preview hunk")
|
||||
map("n", "<leader>hb", gs.toggle_current_line_blame, "Toggle blame")
|
||||
map("n", "<leader>gb", gs.toggle_current_line_blame, "Toggle blame")
|
||||
map("n", "<leader>gd", gs.diffthis, "Diff this")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Magit-style full git interface
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"sindrets/diffview.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
cmd = "Neogit",
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>Neogit<cr>", desc = "Neogit" },
|
||||
},
|
||||
opts = {
|
||||
integrations = {
|
||||
telescope = true,
|
||||
diffview = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user