neovim-flake/modules/plugins/utility/preview/markdown-preview/markdown-preview.nix

59 lines
1.5 KiB
Nix
Raw Permalink Normal View History

{lib, ...}: let
2024-03-24 01:14:39 +01:00
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) bool str listOf;
in {
options.vim.utility.preview = {
markdownPreview = {
enable = mkEnableOption "Markdown preview in neovim with markdown-preview.nvim";
autoStart = mkOption {
2024-03-24 01:14:39 +01:00
type = bool;
default = false;
description = "Automatically open the preview window after entering a Markdown buffer";
};
autoClose = mkOption {
2024-03-24 01:14:39 +01:00
type = bool;
default = true;
description = "Automatically close the preview window after leaving a Markdown buffer";
};
lazyRefresh = mkOption {
2024-03-24 01:14:39 +01:00
type = bool;
default = false;
description = "Only update preview when saving or leaving insert mode";
};
filetypes = mkOption {
2024-03-24 01:14:39 +01:00
type = listOf str;
default = ["markdown"];
description = "Allowed filetypes";
};
alwaysAllowPreview = mkOption {
2024-03-24 01:14:39 +01:00
type = bool;
default = false;
description = "Allow preview on all filetypes";
};
broadcastServer = mkOption {
2024-03-24 01:14:39 +01:00
type = bool;
default = false;
description = "Allow for outside and network wide connections";
};
customIP = mkOption {
2024-03-24 01:14:39 +01:00
type = str;
default = "";
description = "IP-address to use";
};
customPort = mkOption {
2024-03-24 01:14:39 +01:00
type = str;
default = "";
description = "Port to use";
};
};
};
}