feat: Add hunk.nvim
This commit is contained in:
parent
0da68a9e67
commit
e33ccc18ac
18
nix/base-system/flake.lock
generated
18
nix/base-system/flake.lock
generated
@ -48,7 +48,9 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"d2-vim-src": "d2-vim-src",
|
"d2-vim-src": "d2-vim-src",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
|
"hunk-nvim-src": "hunk-nvim-src",
|
||||||
"ionide-nvim-src": "ionide-nvim-src",
|
"ionide-nvim-src": "ionide-nvim-src",
|
||||||
|
"naersk": "naersk_2",
|
||||||
"neogit-src": "neogit-src",
|
"neogit-src": "neogit-src",
|
||||||
"nil-flake": "nil-flake",
|
"nil-flake": "nil-flake",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -541,6 +543,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"hunk-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726776875,
|
||||||
|
"narHash": "sha256-CbvfRmgVshzEH/EUn1/PfNzT+MChtTTmxfi+gTZ7Q6Y=",
|
||||||
|
"owner": "julienvincent",
|
||||||
|
"repo": "hunk.nvim",
|
||||||
|
"rev": "eb89245a66bdfce10436d15923bf4deb43d23c96",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "julienvincent",
|
||||||
|
"repo": "hunk.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ionide-nvim-src": {
|
"ionide-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -98,6 +98,7 @@
|
|||||||
};
|
};
|
||||||
neogit-nvim = custom-flakes.packages."${system}".neogit-nvim;
|
neogit-nvim = custom-flakes.packages."${system}".neogit-nvim;
|
||||||
d2-vim = custom-flakes.packages."${system}".d2-vim;
|
d2-vim = custom-flakes.packages."${system}".d2-vim;
|
||||||
|
hunk-nvim = custom-flakes.packages."${system}".hunk-nvim;
|
||||||
# TODO(zaphar): Apparently this is a remote plugin so it needs some additional love.
|
# TODO(zaphar): Apparently this is a remote plugin so it needs some additional love.
|
||||||
#nvim-bnf = custom-flakes.packages."${system}".nvim-bnf;
|
#nvim-bnf = custom-flakes.packages."${system}".nvim-bnf;
|
||||||
nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context;
|
nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context;
|
||||||
@ -204,7 +205,7 @@ EOF";
|
|||||||
vim-dadbod-completion
|
vim-dadbod-completion
|
||||||
vim-dasht
|
vim-dasht
|
||||||
direnv-vim
|
direnv-vim
|
||||||
]) ++ [ possession-nvim harpoon-nvim d2-vim neogit-nvim ];
|
]) ++ [ possession-nvim harpoon-nvim d2-vim hunk-nvim neogit-nvim ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -577,6 +577,59 @@ require('lualine').setup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Hunk diff tree viewer and editor. Replacement for Meld and company
|
||||||
|
local hunk = require("hunk")
|
||||||
|
hunk.setup({
|
||||||
|
keys = {
|
||||||
|
global = {
|
||||||
|
quit = { "q" },
|
||||||
|
accept = { "<leader><Cr>" },
|
||||||
|
focus_tree = { "<leader>e" },
|
||||||
|
},
|
||||||
|
|
||||||
|
tree = {
|
||||||
|
expand_node = { "l", "<Right>" },
|
||||||
|
collapse_node = { "h", "<Left>" },
|
||||||
|
|
||||||
|
open_file = { "<Cr>" },
|
||||||
|
|
||||||
|
toggle_file = { "a" },
|
||||||
|
},
|
||||||
|
|
||||||
|
diff = {
|
||||||
|
toggle_line = { "a" },
|
||||||
|
toggle_hunk = { "A" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
tree = {
|
||||||
|
-- Mode can either be `nested` or `flat`
|
||||||
|
mode = "nested",
|
||||||
|
width = 35,
|
||||||
|
},
|
||||||
|
--- Can be either `vertical` or `horizontal`
|
||||||
|
layout = "vertical",
|
||||||
|
},
|
||||||
|
|
||||||
|
icons = {
|
||||||
|
selected = "",
|
||||||
|
deselected = "",
|
||||||
|
partially_selected = "",
|
||||||
|
|
||||||
|
folder_open = "",
|
||||||
|
folder_closed = "",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Called right after each window and buffer are created.
|
||||||
|
--hooks = {
|
||||||
|
-- ---@param _context { buf: number, tree: NuiTree, opts: table }
|
||||||
|
-- on_tree_mount = function(_context) end,
|
||||||
|
-- ---@param _context { buf: number, win: number }
|
||||||
|
-- on_diff_mount = function(_context) end,
|
||||||
|
--},
|
||||||
|
})
|
||||||
|
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user