nix-community.nixvim/plugins/by-name/sleuth/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

39 lines
999 B
Nix

{
lib,
helpers,
...
}:
lib.nixvim.plugins.mkVimPlugin {
name = "sleuth";
packPathName = "vim-sleuth";
package = "vim-sleuth";
globalPrefix = "sleuth_";
description = "This plugin automatically adjusts 'shiftwidth' and 'expandtab' heuristically based on the current file.";
maintainers = [ lib.maintainers.GaetanLepage ];
settingsOptions = {
heuristics = helpers.defaultNullOpts.mkFlagInt 1 ''
Whether to enable/disable heuristics by default.
You can also disable heuristics for individual filetypes:
```nix
settings = {
heuristics = 1;
gitcommit_heuristics = 0;
};
```
'';
no_filetype_indent_on = helpers.defaultNullOpts.mkFlagInt 0 ''
Sleuth forces `|:filetype-indent-on|` by default, which enables file-type specific indenting
algorithms and is highly recommended.
'';
};
settingsExample = {
heuristics = 1;
gitcommit_heuristics = 0;
no_filetype_indent_on = 1;
};
}