Created
August 26, 2022 22:37
-
-
Save ddanielsantos/dd692d9acacb3d18a1bdffffea0db49c to your computer and use it in GitHub Desktop.
toggle light/dark on LunarVim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lvim.keys.normal_mode["<leader>t"] = ":lua ToggleTheme() <cr>" | |
function ToggleTheme() | |
if (vim.api.nvim_get_option("background") == "dark") then | |
vim.api.nvim_command("set background=light") | |
else | |
vim.api.nvim_command("set background=dark") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment