nvim: add <Leader>ub to toggle light/dark background

This commit is contained in:
Daniel Lundin 2024-11-21 16:40:26 +01:00
parent 2994a40003
commit 4e803491d6
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI

View file

@ -147,5 +147,8 @@ vim.keymap.set("n", "K", function()
offset_x = 2,
}
end, {})
vim.keymap.set("n", "<Leader>ub", function()
vim.o.background = (vim.o.background == "light" and "dark" or "light")
end, opts("Toggle dark/light background"))