mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-27 02:59:00 +02:00
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
39 lines
999 B
Nix
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;
|
|
};
|
|
}
|