Change toggle_background to ToggleBackground

This commit is contained in:
Kevin Cotugno 2024-12-18 06:29:20 -07:00
parent 0fc3c8f504
commit 7430444986

View File

@ -6,7 +6,7 @@ local max_height = vim.o.lines
local max_width = vim.o.columns local max_width = vim.o.columns
local fullscreen_inset = 2 local fullscreen_inset = 2
function toggle_background() function ToggleBackground()
if vim.opt.background:get() == "dark" then if vim.opt.background:get() == "dark" then
vim.opt.background = "light" vim.opt.background = "light"
else else
@ -52,7 +52,7 @@ end
vim.keymap.set( vim.keymap.set(
"n", "n",
"<F5>", "<F5>",
"<cmd>lua toggle_background()<cr>", "<cmd>lua ToggleBackground()<cr>",
{ desc = "Switch between dark and light themes", noremap = true } { desc = "Switch between dark and light themes", noremap = true }
) )