diff --git a/init.lua b/init.lua index 61479b6..ae5a7a2 100755 --- a/init.lua +++ b/init.lua @@ -1,3 +1,12 @@ +-- 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 + +-- Set colorscheme early to prevent startup flash +vim.cmd('colorscheme monokai') + -- Install package manager -- https://github.com/folke/lazy.nvim local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' diff --git a/lua/config/options.lua b/lua/config/options.lua index bd3105d..e623d6a 100755 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -140,11 +140,13 @@ opt.formatoptions = opt.formatoptions - '2' -- I'm not in gradeschool anymore opt.iskeyword:append('_') --- Open oil.nvim when opening a directory +-- Open oil.nvim when starting with a directory (defer to prevent flash) vim.api.nvim_create_autocmd('VimEnter', { callback = function() if vim.fn.isdirectory(vim.fn.expand('%:p')) == 1 then - require('oil').open(vim.fn.expand('%:p')) + vim.schedule(function() + require('oil').open(vim.fn.expand('%:p')) + end) end end, }) diff --git a/lua/custom/plugins/auto-dark-mode.lua b/lua/custom/plugins/auto-dark-mode.lua index c733b7f..7c4bae7 100755 --- a/lua/custom/plugins/auto-dark-mode.lua +++ b/lua/custom/plugins/auto-dark-mode.lua @@ -50,7 +50,7 @@ return { update_interval = 2000, set_dark_mode = function() vim.api.nvim_set_option_value('background', 'dark', {}) - vim.cmd('colorscheme monokai_soda') + vim.cmd('colorscheme monokai') -- Apply custom highlight settings for Monokai set_lsp_highlights('dark')