-- A tool for splitting diffs in Neovim -- A lot of commands in jujutsu allow you to select parts of a diff. -- The tool used to select the diff can be configured via their ui.diff-editor config option. -- To use hunk.nvim add the following to your jujutsu config.toml: -- -- [ui] -- diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"] -- -- https://github.com/julienvincent/hunk.nvim return { "hunk.nvim", lazy = false, after = function() require("hunk").setup({ keys = { global = { quit = { "q" }, accept = { "" }, focus_tree = { "e" }, }, tree = { expand_node = { "l", "" }, collapse_node = { "h", "" }, open_file = { "" }, toggle_file = { "a" }, }, diff = { toggle_hunk = { "A" }, toggle_line = { "a" }, -- This is like toggle_line but it will also toggle the line on the other -- 'side' of the diff. toggle_line_pair = { "s" }, prev_hunk = { "[h" }, next_hunk = { "]h" }, -- Jump between the left and right diff view toggle_focus = { "" }, }, }, 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, }, }) end, }