nvf/modules/ui/smartcolumn/smartcolumn.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

{lib, ...}: let
inherit (lib) mkEnableOption mkOption types;
in {
2023-04-05 13:58:56 +00:00
options.vim.ui.smartcolumn = {
enable = mkEnableOption "line length indicator";
2023-04-05 13:58:56 +00:00
showColumnAt = mkOption {
type = types.nullOr types.int;
default = 120;
description = "The position at which the column will be displayed. Set to null to disable";
};
disabledFiletypes = mkOption {
type = types.listOf types.str;
default = ["help" "text" "markdown" "NvimTree" "alpha"];
description = "The filetypes smartcolumn will be disabled for.";
};
2023-04-11 10:57:34 +00:00
columnAt = {
languages = lib.mkOption {
description = "The position at which smart column should be displayed for each individual buffer type";
type = lib.types.submodule {
2023-06-04 14:36:01 +00:00
freeformType = with lib.types; attrsOf (either int (listOf int));
};
2023-06-04 14:36:01 +00:00
example = lib.literalExpression ''
vim.ui.smartcolumn.columnAt.languages = {
nix = 110;
ruby = 120;
java = 130;
go = [90 130];
};
'';
};
2023-04-05 13:58:56 +00:00
};
};
}