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