nix-community.nixvim/plugins/by-name/guess-indent/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, ... }:
let
inherit (lib) types;
inherit (lib.nixvim) defaultNullOpts;
in
2024-12-22 09:58:27 +00:00
lib.nixvim.plugins.mkNeovimPlugin {
2024-07-24 13:43:08 +02:00
name = "guess-indent";
packPathName = "guess-indent.nvim";
package = "guess-indent-nvim";
2024-07-24 13:43:08 +02:00
2024-09-27 05:28:00 +01:00
maintainers = [ lib.maintainers.GGORG ];
2024-07-24 13:43:08 +02:00
settingsOptions = {
auto_cmd = defaultNullOpts.mkBool true ''
2024-07-24 13:43:08 +02:00
Whether to create autocommand to automatically detect indentation
'';
override_editorconfig = defaultNullOpts.mkBool false ''
2024-07-24 13:43:08 +02:00
Whether or not to override indentation set by Editorconfig
'';
filetype_exclude =
defaultNullOpts.mkListOf types.str
2024-07-24 13:43:08 +02:00
[
"netrw"
"tutor"
]
''
Filetypes to ignore indentation detection in
'';
buftype_exclude =
defaultNullOpts.mkListOf types.str
2024-07-24 13:43:08 +02:00
[
"help"
"nofile"
"terminal"
"prompt"
]
''
Buffer types to ignore indentation detection in
'';
on_tab_options = defaultNullOpts.mkAttrsOf types.anything { expandtab = false; } ''
2024-07-24 13:43:08 +02:00
A table of vim options when tabs are detected
'';
on_space_options =
defaultNullOpts.mkAttrsOf types.anything
2024-07-24 13:43:08 +02:00
{
expandtab = true;
tabstop = "detected";
softtabstop = "detected";
shiftwidth = "detected";
}
''
A table of vim options when spaces are detected
'';
};
settingsExample = {
auto_cmd = false;
override_editorconfig = true;
filetype_exclude = [ "markdown" ];
};
}