Hello all,
Thank for your Themery plugin, very kind.
I'm facing issue when trying to access currentTheme in a function launched on globalAfter hook.
return {
{
"zaldih/themery.nvim",
lazy = false,
config = function()
_G.setTransparent = function()
local ok, themery = pcall(require, "themery")
if ok and themery and type(themery.getCurrentTheme) == "function" then
local curtheme = themery.getCurrentTheme()
if curtheme and curtheme.name then
vim.print("Mon thème actuel : " .. curtheme.name)
end
end
-- I'd like to use here the variable curtheme.name in a if condition
vim.cmd("highlight Normal guibg=none")
vim.cmd("highlight NonText guibg=none")
vim.cmd("highlight Normal ctermbg=none")
vim.cmd("highlight NonText ctermbg=none")
end
require("themery").setup({
themes = {
"gruvbox",
…
},
globalAfter = [[
setTransparent()
]]
The problem is that my theme does not switch. It does when I remove the first part of my setTransparent function.
Hello all,
Thank for your Themery plugin, very kind.
I'm facing issue when trying to access currentTheme in a function launched on globalAfter hook.
The problem is that my theme does not switch. It does when I remove the first part of my setTransparent function.