mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	 60ebec1956
			
		
	
	
	60ebec1956
	
	
	
		
			
			`:checkhealth yazi` was warning about it. Project `README` recently added it to the requirements.
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			857 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			857 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   options,
 | |
|   config,
 | |
|   pkgs,
 | |
|   lib,
 | |
|   ...
 | |
| }: let
 | |
|   inherit (lib.modules) mkIf;
 | |
|   inherit (lib.nvim.binds) mkKeymap;
 | |
| 
 | |
|   cfg = config.vim.utility.yazi-nvim;
 | |
|   keys = cfg.mappings;
 | |
| 
 | |
|   inherit (options.vim.utility.yazi-nvim) mappings;
 | |
| in {
 | |
|   config = mkIf cfg.enable {
 | |
|     vim = {
 | |
|       startPlugins = ["snacks-nvim"];
 | |
|       lazy.plugins."yazi.nvim" = {
 | |
|         package = pkgs.vimPlugins.yazi-nvim;
 | |
|         setupModule = "yazi";
 | |
|         inherit (cfg) setupOpts;
 | |
|         event = ["BufAdd" "VimEnter"];
 | |
| 
 | |
|         keys = [
 | |
|           (mkKeymap "n" keys.openYazi "<cmd>Yazi<CR>" {desc = mappings.openYazi.description;})
 | |
|           (mkKeymap "n" keys.openYaziDir "<cmd>Yazi cwd<CR>" {desc = mappings.openYaziDir.description;})
 | |
|           (mkKeymap "n" keys.yaziToggle "<cmd>Yazi toggle<CR>" {desc = mappings.yaziToggle.description;})
 | |
|         ];
 | |
|       };
 | |
|     };
 | |
|   };
 | |
| }
 |