use lua way to handle color scheme errors

04-colorscheme
christianchiarulli 2 years ago
parent 67f73b7044
commit 68de5d4fab

@ -1,8 +1,7 @@
vim.cmd [[ local colorscheme = "default"
try
colorscheme darkplus local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
catch /^Vim\%((\a\+)\)\=:E185/ if not status_ok then
colorscheme default vim.notify("colorscheme " .. colorscheme .. " not found!")
set background=dark return
endtry end
]]

Loading…
Cancel
Save