2024-02-13 13:33:10 +01:00
|
|
|
{lib, ...}: let
|
2024-03-24 01:14:39 +01:00
|
|
|
inherit (lib.options) mkEnableOption mkOption;
|
|
|
|
inherit (lib.types) bool str listOf;
|
2024-02-13 13:33:10 +01:00
|
|
|
in {
|
|
|
|
options.vim.utility.preview = {
|
|
|
|
markdownPreview = {
|
2024-02-13 15:45:47 +01:00
|
|
|
enable = mkEnableOption "Markdown preview in neovim with markdown-preview.nvim";
|
2024-02-13 13:33:10 +01:00
|
|
|
|
|
|
|
autoStart = mkOption {
|
2024-03-24 01:14:39 +01:00
|
|
|
type = bool;
|
2024-02-13 13:33:10 +01:00
|
|
|
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;
|
2024-02-13 13:33:10 +01:00
|
|
|
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;
|
2024-02-13 13:33:10 +01:00
|
|
|
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;
|
2024-02-13 13:33:10 +01:00
|
|
|
default = ["markdown"];
|
|
|
|
description = "Allowed filetypes";
|
|
|
|
};
|
|
|
|
|
|
|
|
alwaysAllowPreview = mkOption {
|
2024-03-24 01:14:39 +01:00
|
|
|
type = bool;
|
2024-02-13 13:33:10 +01:00
|
|
|
default = false;
|
|
|
|
description = "Allow preview on all filetypes";
|
|
|
|
};
|
|
|
|
|
|
|
|
broadcastServer = mkOption {
|
2024-03-24 01:14:39 +01:00
|
|
|
type = bool;
|
2024-02-13 13:33:10 +01:00
|
|
|
default = false;
|
|
|
|
description = "Allow for outside and network wide connections";
|
|
|
|
};
|
|
|
|
|
|
|
|
customIP = mkOption {
|
2024-03-24 01:14:39 +01:00
|
|
|
type = str;
|
2024-02-13 13:33:10 +01:00
|
|
|
default = "";
|
|
|
|
description = "IP-address to use";
|
|
|
|
};
|
|
|
|
|
|
|
|
customPort = mkOption {
|
2024-03-24 01:14:39 +01:00
|
|
|
type = str;
|
2024-02-13 13:33:10 +01:00
|
|
|
default = "";
|
|
|
|
description = "Port to use";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|