2024-03-24 11:31:50 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
helpers,
|
|
|
|
...
|
|
|
|
}:
|
2024-12-22 09:58:27 +00:00
|
|
|
lib.nixvim.plugins.mkVimPlugin {
|
2024-03-24 11:31:50 +01:00
|
|
|
name = "sleuth";
|
2024-12-13 08:27:14 -06:00
|
|
|
packPathName = "vim-sleuth";
|
2024-09-02 14:05:11 +01:00
|
|
|
package = "vim-sleuth";
|
2024-03-24 11:31:50 +01:00
|
|
|
globalPrefix = "sleuth_";
|
|
|
|
|
2024-05-05 19:39:35 +02:00
|
|
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
2024-03-24 11:31:50 +01:00
|
|
|
|
|
|
|
settingsOptions = {
|
2024-09-08 13:52:18 +01:00
|
|
|
heuristics = helpers.defaultNullOpts.mkFlagInt 1 ''
|
2024-03-24 11:31:50 +01:00
|
|
|
Whether to enable/disable heuristics by default.
|
|
|
|
|
|
|
|
You can also disable heuristics for individual filetypes:
|
|
|
|
```nix
|
|
|
|
settings = {
|
2024-09-08 13:52:18 +01:00
|
|
|
heuristics = 1;
|
|
|
|
gitcommit_heuristics = 0;
|
2024-03-24 11:31:50 +01:00
|
|
|
};
|
|
|
|
```
|
|
|
|
'';
|
|
|
|
|
2024-09-08 13:52:18 +01:00
|
|
|
no_filetype_indent_on = helpers.defaultNullOpts.mkFlagInt 0 ''
|
2024-03-24 11:31:50 +01:00
|
|
|
Sleuth forces `|:filetype-indent-on|` by default, which enables file-type specific indenting
|
|
|
|
algorithms and is highly recommended.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
settingsExample = {
|
2024-09-08 13:52:18 +01:00
|
|
|
heuristics = 1;
|
|
|
|
gitcommit_heuristics = 0;
|
|
|
|
no_filetype_indent_on = 1;
|
2024-03-24 11:31:50 +01:00
|
|
|
};
|
|
|
|
}
|