Skip to content

Commit

Permalink
plugins/smart-splits: init
Browse files Browse the repository at this point in the history
  • Loading branch information
foo-dogsquared authored and GaetanLepage committed Feb 28, 2024
1 parent bb9d560 commit 8bb460e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
./utils/quickmath.nix
./utils/refactoring.nix
./utils/rest.nix
./utils/smart-splits.nix
./utils/specs.nix
./utils/spider.nix
./utils/startify.nix
Expand Down
23 changes: 23 additions & 0 deletions plugins/utils/smart-splits.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
helpers,
...
}:
helpers.neovim-plugin.mkNeovimPlugin config {
name = "smart-splits";
originalName = "smart-splits.nvim";
defaultPackage = pkgs.vimPlugins.smart-splits-nvim;

maintainers = [lib.maintainers.foo-dogsquared];

settingsExample = {
resize_mode = {
quit_key = "<ESC>";
resize_keys = ["h" "j" "k" "l"];
silent = true;
};
ignored_events = ["BufEnter" "WinEnter"];
};
}
24 changes: 24 additions & 0 deletions tests/test-sources/plugins/utils/smart-splits.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
empty = {
plugins.smart-splits.enable = true;
};

example = {
plugins.smart-splits = {
enable = true;

settings = {
ignored_filetypes = ["nofile" "quickfix" "prompt"];
ignored_buftypes = ["NvimTree"];
default_amount = 3;
move_cursor_same_row = true;
cursor_follows_swapped_bufs = true;
resize_mode = {
quit_key = "<ESC>";
resize_keys = ["h" "j" "k" "l"];
silent = true;
};
};
};
};
}

0 comments on commit 8bb460e

Please sign in to comment.