mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-11-04 12:42:21 +00:00 
			
		
		
		
	python/uv: init
This commit is contained in:
		
					parent
					
						
							
								5bad5dd94c
							
						
					
				
			
			
				commit
				
					
						871440fb7e
					
				
			
		
					 3 changed files with 35 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -11,6 +11,7 @@
 | 
			
		|||
  inherit (lib.lists) isList;
 | 
			
		||||
  inherit (lib.types) enum either listOf package str bool;
 | 
			
		||||
  inherit (lib.nvim.lua) expToLua;
 | 
			
		||||
  inherit (lib.nvim.types) mkPluginSetupOption;
 | 
			
		||||
 | 
			
		||||
  cfg = config.vim.languages.python;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -225,6 +226,11 @@ in {
 | 
			
		|||
        '';
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    uv = {
 | 
			
		||||
      enable = mkEnableOption "the uv.nvim plugin";
 | 
			
		||||
      setupOpts = mkPluginSetupOption "uv.nvim." {};
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable (mkMerge [
 | 
			
		||||
| 
						 | 
				
			
			@ -261,5 +267,16 @@ in {
 | 
			
		|||
      vim.debugger.nvim-dap.enable = true;
 | 
			
		||||
      vim.debugger.nvim-dap.sources.python-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    (mkIf cfg.uv.enable {
 | 
			
		||||
      vim.lazy.plugins."uv.nvim" = {
 | 
			
		||||
        package = "uv.nvim";
 | 
			
		||||
        setupModule = "uv";
 | 
			
		||||
        inherit (cfg.uv) setupOpts;
 | 
			
		||||
        # Plugin should be loaded whenever we enter a buffer
 | 
			
		||||
        # so it can load the uv virtual environment.
 | 
			
		||||
        event = ["BufEnter"];
 | 
			
		||||
      };
 | 
			
		||||
    })
 | 
			
		||||
  ]);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue