mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 12:45:24 +02:00
plugins/hunk: init
Add support for [hunk.nvim][1], a plugin for splitting diffs. Also add myself as a maintainer for it. [1]: https://github.com/julienvincent/hunk.nvim
This commit is contained in:
parent
b505a2aebd
commit
69266437be
2 changed files with 144 additions and 0 deletions
50
plugins/by-name/hunk/default.nix
Normal file
50
plugins/by-name/hunk/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "hunk";
|
||||
packPathName = "hunk.nvim";
|
||||
package = "hunk-nvim";
|
||||
|
||||
description = ''
|
||||
A tool for splitting diffs in Neovim.
|
||||
|
||||
If you wish to display icons in the file tree you should enable either
|
||||
`plugins.web-devicons` or `plugins.mini`. If using `plugins.mini`, you
|
||||
must enable the `icons` module.
|
||||
'';
|
||||
|
||||
maintainers = [ lib.maintainers.jalil-salame ];
|
||||
|
||||
extraConfig.plugins.nui.enable = lib.mkDefault true; # required dependency
|
||||
|
||||
settingsExample = {
|
||||
keys.global.quit = [ "x" ];
|
||||
|
||||
ui = {
|
||||
tree = {
|
||||
mode = "flat";
|
||||
width = 40;
|
||||
};
|
||||
layout = "horizontal";
|
||||
};
|
||||
|
||||
hooks = {
|
||||
on_tree_mount =
|
||||
lib.nixvim.nestedLiteralLua # lua
|
||||
''
|
||||
---@param _context { buf: number, tree: NuiTree, opts: table }
|
||||
function(_context) end
|
||||
'';
|
||||
on_diff_mount =
|
||||
lib.nixvim.nestedLiteralLua # lua
|
||||
''
|
||||
---@param _context { buf: number, win: number }
|
||||
function(_context) end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue