mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
plugins/indent-o-matic: init (#1144)
This commit is contained in:
parent
7eb74fecd1
commit
63558cff59
3 changed files with 43 additions and 0 deletions
|
@ -131,6 +131,7 @@
|
|||
./utils/harpoon.nix
|
||||
./utils/illuminate.nix
|
||||
./utils/indent-blankline.nix
|
||||
./utils/indent-o-matic.nix
|
||||
./utils/instant.nix
|
||||
./utils/intellitab.nix
|
||||
./utils/lastplace.nix
|
||||
|
|
25
plugins/utils/indent-o-matic.nix
Normal file
25
plugins/utils/indent-o-matic.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config
|
||||
{
|
||||
name = "indent-o-matic";
|
||||
defaultPackage = pkgs.vimPlugins.indent-o-matic;
|
||||
maintainers = [helpers.maintainers.alisonjenkins];
|
||||
settingsOptions = {
|
||||
max_lines = helpers.defaultNullOpts.mkInt 2048 "Number of lines without indentation before giving up (use -1 for infinite)";
|
||||
skip_multiline = helpers.defaultNullOpts.mkBool false "Skip multi-line comments and strings (more accurate detection but less performant)";
|
||||
standard_widths = helpers.defaultNullOpts.mkListOf types.ints.unsigned ''[2 4 8]'' "Space indentations that should be detected";
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
max_lines = 2048;
|
||||
skip_multiline = false;
|
||||
standard_widths = [2 4 8];
|
||||
};
|
||||
}
|
17
tests/test-sources/plugins/utils/indent-o-matic.nix
Normal file
17
tests/test-sources/plugins/utils/indent-o-matic.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.indent-o-matic.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.indent-o-matic = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
max_lines = 2048;
|
||||
skip_multiline = false;
|
||||
standard_widths = [2 4 8];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue