Updated themeswitcher
This commit is contained in:
@@ -7,7 +7,7 @@ function M.themeselector(opts)
|
||||
local conf = require("telescope.config").values
|
||||
local actions = require("telescope.actions")
|
||||
local action_state = require("telescope.actions.state")
|
||||
local action_set = require("telescope.actions.set")
|
||||
-- local action_set = require("telescope.actions.set")
|
||||
|
||||
local configDir = vim.fn.stdpath("config")
|
||||
local prefsFile = configDir .. "/lua/taken/prefs.lua"
|
||||
@@ -29,15 +29,15 @@ function M.themeselector(opts)
|
||||
local selection = action_state.get_selected_entry()
|
||||
applytofile(selection.value, prefsFile)
|
||||
end)
|
||||
action_set.shift_selection:enhance({
|
||||
post = function()
|
||||
local selection = action_state.get_selected_entry()
|
||||
if selection == nil then
|
||||
vim.notify("Error while selecting theme", vim.log.levels.ERROR)
|
||||
end
|
||||
vim.cmd("colorscheme " .. selection.value)
|
||||
end,
|
||||
})
|
||||
-- action_set.shift_selection:enhance({
|
||||
-- post = function()
|
||||
-- local selection = action_state.get_selected_entry()
|
||||
-- if selection == nil then
|
||||
-- vim.notify("Error while selecting theme", vim.log.levels.ERROR)
|
||||
-- end
|
||||
-- vim.cmd("colorscheme " .. selection.value)
|
||||
-- end,
|
||||
-- })
|
||||
-- actions.close:enhance({
|
||||
-- post = function()
|
||||
-- local selection = action_state.get_selected_entry()
|
||||
|
||||
Reference in New Issue
Block a user