mirror of
				https://github.com/folke/lazy.nvim.git
				synced 2025-10-31 06:21:14 +00:00 
			
		
		
		
	refactor: move core modules needed for loading under core
This commit is contained in:
		
					parent
					
						
							
								3218c2d9ec
							
						
					
				
			
			
				commit
				
					
						fca984b18c
					
				
			
		
					 12 changed files with 27 additions and 32 deletions
				
			
		
							
								
								
									
										41
									
								
								lua/lazy/core/config.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								lua/lazy/core/config.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,41 @@ | |||
| local Util = require("lazy.core.util") | ||||
| 
 | ||||
| local M = {} | ||||
| 
 | ||||
| ---@class LazyConfig | ||||
| M.defaults = { | ||||
|   opt = true, | ||||
|   plugins = "config.plugins", | ||||
|   plugins_local = { | ||||
|     path = vim.fn.expand("~/projects"), | ||||
|     patterns = {}, | ||||
|   }, | ||||
|   package_path = vim.fn.stdpath("data") .. "/site/pack/lazy", | ||||
| } | ||||
| 
 | ||||
| M.ns = vim.api.nvim_create_namespace("lazy") | ||||
| 
 | ||||
| ---@type table<string, LazyPlugin> | ||||
| M.plugins = {} | ||||
| 
 | ||||
| ---@type LazyConfig | ||||
| M.options = {} | ||||
| 
 | ||||
| ---@param opts? LazyConfig | ||||
| function M.setup(opts) | ||||
|   M.options = vim.tbl_deep_extend("force", M.defaults, opts or {}) | ||||
| 
 | ||||
|   -- vim.fn.mkdir(M.options.package_path, "p") | ||||
| 
 | ||||
|   vim.api.nvim_create_autocmd("User", { | ||||
|     pattern = "VeryLazy", | ||||
|     once = true, | ||||
|     callback = function() | ||||
|       require("lazy.view").setup() | ||||
|     end, | ||||
|   }) | ||||
| 
 | ||||
|   Util.very_lazy() | ||||
| end | ||||
| 
 | ||||
| return M | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue