1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-21 17:59:41 +01:00
nixvim/plugins/by-name/sleuth/default.nix
2025-11-19 15:22:27 +00:00

37 lines
963 B
Nix

{
lib,
...
}:
lib.nixvim.plugins.mkVimPlugin {
name = "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 = lib.nixvim.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 = lib.nixvim.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;
};
}