-- Disable netrw before anything else loads vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwSettings = 1 vim.g.loaded_netrwFileHandlers = 1 -- Apply transparent background after any colorscheme change vim.api.nvim_create_autocmd('ColorScheme', { pattern = '*', callback = function() vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) vim.api.nvim_set_hl(0, 'NormalNC', { bg = 'none' }) end, }) local themes = require('custom.themes') -- Set correct colorscheme before plugins load (prevents flash) local is_dark = vim.trim(vim.fn.system('defaults read -g AppleInterfaceStyle 2>/dev/null')) == 'Dark' vim.o.background = is_dark and 'dark' or 'light' local ok, _ = pcall(function() vim.cmd.colorscheme(is_dark and themes.dark or themes.light) end) if not ok then vim.cmd.colorscheme('habamax') end