plugins/sleuth: init

This commit is contained in:
Gaetan Lepage 2024-03-24 11:31:50 +01:00 committed by Gaétan Lepage
parent d261b39e7c
commit ddac6db152
3 changed files with 58 additions and 0 deletions

View file

@ -174,6 +174,7 @@
./utils/quickmath.nix
./utils/refactoring.nix
./utils/rest.nix
./utils/sleuth.nix
./utils/smart-splits.nix
./utils/specs.nix
./utils/spider.nix

40
plugins/utils/sleuth.nix Normal file
View file

@ -0,0 +1,40 @@
{
config,
lib,
helpers,
pkgs,
...
}:
helpers.vim-plugin.mkVimPlugin config {
name = "sleuth";
originalName = "vim-sleuth";
defaultPackage = pkgs.vimPlugins.vim-sleuth;
globalPrefix = "sleuth_";
maintainers = [lib.maintainers.GaetanLepage];
settingsOptions = {
heuristics = helpers.defaultNullOpts.mkBool true ''
Whether to enable/disable heuristics by default.
You can also disable heuristics for individual filetypes:
```nix
settings = {
heuristics = true;
gitcommit_heuristics = false;
};
```
'';
no_filetype_indent_on = helpers.defaultNullOpts.mkBool false ''
Sleuth forces `|:filetype-indent-on|` by default, which enables file-type specific indenting
algorithms and is highly recommended.
'';
};
settingsExample = {
heuristics = true;
gitcommit_heuristics = false;
no_filetype_indent_on = true;
};
}

View file

@ -0,0 +1,17 @@
{
empty = {
plugins.sleuth.enable = true;
};
example = {
plugins.sleuth = {
enable = true;
settings = {
heuristics = true;
gitcommit_heuristics = false;
no_filetype_indent_on = true;
};
};
};
}