mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 23:16:46 +00:00
8ff50562d7
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
26 lines
684 B
Nix
26 lines
684 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.strings) concatMapStringsSep;
|
|
inherit (lib.modules) mkIf;
|
|
cfg = config.vim.utility.preview.markdownPreview;
|
|
in {
|
|
config = mkIf cfg.enable {
|
|
vim.startPlugins = [pkgs.vimPlugins.markdown-preview-nvim];
|
|
|
|
vim.globals = {
|
|
mkdp_auto_start = cfg.autoStart;
|
|
mkdp_auto_close = cfg.autoClose;
|
|
mkdp_refresh_slow = cfg.lazyRefresh;
|
|
mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)];
|
|
mkdp_command_for_global = cfg.alwaysAllowPreview;
|
|
mkdp_open_to_the_world = cfg.broadcastServer;
|
|
mkdp_open_ip = cfg.customIP;
|
|
mkdp_port = cfg.customPort;
|
|
};
|
|
};
|
|
}
|