Disable sunglasses when viewing theme

This commit is contained in:
2025-05-03 15:12:59 +02:00
parent 702289f229
commit 12648eef7d

View File

@@ -22,6 +22,7 @@ function M.themeselector(opts)
}, },
}, opts) }, opts)
vim.cmd("SunglassesDisable")
pickers pickers
.new(combined, { .new(combined, {
prompt_title = "Colorscheme", prompt_title = "Colorscheme",
@@ -34,6 +35,7 @@ function M.themeselector(opts)
actions.close(prompt_bufnr) actions.close(prompt_bufnr)
local selection = action_state.get_selected_entry() local selection = action_state.get_selected_entry()
change_theme(selection.value) change_theme(selection.value)
vim.cmd("SunglassesEnable")
end) end)
action_set.shift_selection:enhance({ action_set.shift_selection:enhance({
post = function() post = function()
@@ -51,6 +53,7 @@ function M.themeselector(opts)
vim.notify("Error while selecting theme", vim.log.levels.ERROR) vim.notify("Error while selecting theme", vim.log.levels.ERROR)
end end
vim.cmd("colorscheme " .. current_theme) vim.cmd("colorscheme " .. current_theme)
vim.cmd("SunglassesEnable")
end, end,
}) })
return true return true