mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 10:18:36 +02:00
plugins/committia: init
This commit is contained in:
parent
7a1b458c3e
commit
3f12558d49
3 changed files with 74 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
./filetrees/neo-tree.nix
|
./filetrees/neo-tree.nix
|
||||||
./filetrees/nvim-tree.nix
|
./filetrees/nvim-tree.nix
|
||||||
|
|
||||||
|
./git/committia.nix
|
||||||
./git/diffview.nix
|
./git/diffview.nix
|
||||||
./git/fugitive.nix
|
./git/fugitive.nix
|
||||||
./git/git-worktree.nix
|
./git/git-worktree.nix
|
||||||
|
|
51
plugins/git/committia.nix
Normal file
51
plugins/git/committia.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
helpers,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
helpers.vim-plugin.mkVimPlugin config {
|
||||||
|
name = "committia";
|
||||||
|
description = "committia.vim";
|
||||||
|
package = pkgs.vimPlugins.committia-vim;
|
||||||
|
globalPrefix = "committia_";
|
||||||
|
extraPackages = [pkgs.git];
|
||||||
|
|
||||||
|
maintainers = [lib.maintainers.alisonjenkins];
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
open_only_vim_starting = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
If `false`, committia.vim always attempts to open committia's buffer when `COMMIT_EDITMSG` buffer is opened.
|
||||||
|
If you use `vim-fugitive`, I recommend to set this value to `true`.
|
||||||
|
'';
|
||||||
|
|
||||||
|
use_singlecolumn = helpers.defaultNullOpts.mkStr "always" ''
|
||||||
|
If the value is 'always', `committia.vim` always employs single column mode.
|
||||||
|
'';
|
||||||
|
|
||||||
|
min_window_width = helpers.defaultNullOpts.mkUnsignedInt 160 ''
|
||||||
|
If the width of window is narrower than the value, `committia.vim` employs single column mode.
|
||||||
|
'';
|
||||||
|
|
||||||
|
status_window_opencmd = helpers.defaultNullOpts.mkStr "belowright split" ''
|
||||||
|
Vim command which opens a status window in multi-columns mode.
|
||||||
|
'';
|
||||||
|
|
||||||
|
diff_window_opencmd = helpers.defaultNullOpts.mkStr "botright vsplit" ''
|
||||||
|
Vim command which opens a diff window in multi-columns mode.
|
||||||
|
'';
|
||||||
|
|
||||||
|
singlecolumn_diff_window_opencmd = helpers.defaultNullOpts.mkStr "belowright split" ''
|
||||||
|
Vim command which opens a diff window in single-column mode.
|
||||||
|
'';
|
||||||
|
|
||||||
|
edit_window_width = helpers.defaultNullOpts.mkUnsignedInt 80 ''
|
||||||
|
If `committia.vim` is in multi-columns mode, specifies the width of the edit window.
|
||||||
|
'';
|
||||||
|
|
||||||
|
status_window_min_height = helpers.defaultNullOpts.mkUnsignedInt 0 ''
|
||||||
|
Minimum height of a status window.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
22
tests/test-sources/plugins/git/committia.nix
Normal file
22
tests/test-sources/plugins/git/committia.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.committia.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
default = {
|
||||||
|
plugins.committia = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
open_only_vim_starting = true;
|
||||||
|
use_singlecolumn = "always";
|
||||||
|
min_window_width = 160;
|
||||||
|
status_window_opencmd = "belowright split";
|
||||||
|
diff_window_opencmd = "botright vsplit";
|
||||||
|
singlecolumn_diff_window_opencmd = "belowright split";
|
||||||
|
edit_window_width = 80;
|
||||||
|
status_window_min_height = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue