Add toggle to keep light mode based on terminal colorscheme
This commit is contained in:
parent
41d85c9f70
commit
98bc388c4a
1 changed files with 9 additions and 0 deletions
9
init.lua
9
init.lua
|
@ -893,3 +893,12 @@ vim.api.nvim_create_user_command("FormatEnable", function()
|
|||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
|
||||
function file_exists(name)
|
||||
local f = io.open(name, "r")
|
||||
return f ~= nil and io.close(f)
|
||||
end
|
||||
|
||||
if file_exists("/home/aselimov/.config/.stlight") then
|
||||
vim.opt.background = "light"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue