mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-11-04 04:32:21 +00:00 
			
		
		
		
	
		
			Some checks failed
		
		
	
	Check for typos in the source tree / check-typos (push) Has been cancelled
				
			
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			592 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			592 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  pkgs,
 | 
						|
  config,
 | 
						|
  lib,
 | 
						|
  ...
 | 
						|
}: let
 | 
						|
  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 = cfg.filetypes;
 | 
						|
      mkdp_command_for_global = cfg.alwaysAllowPreview;
 | 
						|
      mkdp_open_to_the_world = cfg.broadcastServer;
 | 
						|
      mkdp_open_ip = cfg.customIP;
 | 
						|
      mkdp_port = cfg.customPort;
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |