nix-community.nixvim/plugins/by-name/guess-indent/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

67 lines
1.6 KiB
Nix

{ lib, ... }:
let
inherit (lib) types;
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "guess-indent";
packPathName = "guess-indent.nvim";
package = "guess-indent-nvim";
description = "Automatic indentation style detection for Neovim.";
maintainers = [ lib.maintainers.GGORG ];
settingsOptions = {
auto_cmd = defaultNullOpts.mkBool true ''
Whether to create autocommand to automatically detect indentation
'';
override_editorconfig = defaultNullOpts.mkBool false ''
Whether or not to override indentation set by Editorconfig
'';
filetype_exclude =
defaultNullOpts.mkListOf types.str
[
"netrw"
"tutor"
]
''
Filetypes to ignore indentation detection in
'';
buftype_exclude =
defaultNullOpts.mkListOf types.str
[
"help"
"nofile"
"terminal"
"prompt"
]
''
Buffer types to ignore indentation detection in
'';
on_tab_options = defaultNullOpts.mkAttrsOf types.anything { expandtab = false; } ''
A table of vim options when tabs are detected
'';
on_space_options =
defaultNullOpts.mkAttrsOf types.anything
{
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" ];
};
}