mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
plugins/sleuth: init
This commit is contained in:
parent
d261b39e7c
commit
ddac6db152
3 changed files with 58 additions and 0 deletions
|
@ -174,6 +174,7 @@
|
||||||
./utils/quickmath.nix
|
./utils/quickmath.nix
|
||||||
./utils/refactoring.nix
|
./utils/refactoring.nix
|
||||||
./utils/rest.nix
|
./utils/rest.nix
|
||||||
|
./utils/sleuth.nix
|
||||||
./utils/smart-splits.nix
|
./utils/smart-splits.nix
|
||||||
./utils/specs.nix
|
./utils/specs.nix
|
||||||
./utils/spider.nix
|
./utils/spider.nix
|
||||||
|
|
40
plugins/utils/sleuth.nix
Normal file
40
plugins/utils/sleuth.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
17
tests/test-sources/plugins/utils/sleuth.nix
Normal file
17
tests/test-sources/plugins/utils/sleuth.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue