refactor: move mapleader and icons_enabled to AstroNvim opts
				
					
				
			This commit is contained in:
		
							
								
								
									
										18
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								init.lua
									
									
									
									
									
								
							@@ -14,16 +14,18 @@ if not lazy_loaded then
 | 
			
		||||
  vim.cmd.quit()
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- must configure leader key before Lazy is set up
 | 
			
		||||
vim.g.mapleader = " "
 | 
			
		||||
 | 
			
		||||
-- Set to false to disable icons (if no Nerd Font is available)
 | 
			
		||||
vim.g.icons_enabled = true
 | 
			
		||||
 | 
			
		||||
---@type LazyConfig
 | 
			
		||||
lazy.setup({
 | 
			
		||||
  -- TODO: change `branch="v4"` to `version="^4"` on release
 | 
			
		||||
  { "AstroNvim/AstroNvim", branch = "v4", import = "astronvim.plugins" },
 | 
			
		||||
  {
 | 
			
		||||
    "AstroNvim/AstroNvim",
 | 
			
		||||
    branch = "v4", -- TODO: change `branch="v4"` to `version="^4"` on release
 | 
			
		||||
    import = "astronvim.plugins",
 | 
			
		||||
    opts = { -- AstroNvim options must be set with the `import` key
 | 
			
		||||
      mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
 | 
			
		||||
      icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
 | 
			
		||||
      pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  -- AstroCommunity: import any community modules here
 | 
			
		||||
  -- TODO: Remove branch v4 on release
 | 
			
		||||
  -- { "AstroNvim/astrocommunity", branch = "v4" },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user