dotfiles/.config/nvim/lua/config/keymaps.lua

14 lines
498 B
Lua
Raw Normal View History

2023-10-06 06:13:04 -07:00
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
function toggle_background()
if vim.opt.background:get() == "dark" then
vim.opt.background = "light"
else
vim.opt.background = "dark"
end
end
vim.keymap.set("n", "<F5>", "<cmd>lua toggle_background()<cr>", { desc = "Switch between dark and light themes", noremap = true })