Alexis12119 / nvim-config

Generalized and Personalized
275 stars 27 forks source link

issue: toggle notification in mapping #46

Closed KevinNitroG closed 3 months ago

KevinNitroG commented 3 months ago

the toggle transparent & theme in mappings.lua code logic isn't good. Those vim.g.switch_theme, vim.g.transparency_enabled are nil by default.

We use dark mode. But if someone uses light mode, when he switches to dark mode, the notification shows that he has switched to light mode.

So I suggest binding the global variables in chadrc.lua to get those variables.

vim.g.darkmode_enabled = M.base46.theme_toggle[1] == M.base46.theme
vim.g.transparency_enabled = M.base46.transparency

I don't know if we need to handle it if there's no M.base46.theme_toggle.

Alexis12119 commented 3 months ago

If you can create a PR for it. Please, create one I'm just busy right now.

Alexis12119 commented 3 months ago

I don't know if we need to handle it if there's no M.base46.theme_toggle.

I think it always exist

Alexis12119 commented 3 months ago

Wait, the one for transparency is fine

KevinNitroG commented 3 months ago

I don't know if we need to handle it if there's no M.base46.theme_toggle.

I think it always exist

There's a notification to add it when there's no M.base46.theme_toggle

Alexis12119 commented 3 months ago

I think it's fine to leave both of them as it is. I think siduck also handles the edge cases of his functions

Alexis12119 commented 3 months ago

I don't know if we need to handle it if there's no M.base46.theme_toggle.

I think it always exist

There's a notification to add it when there's no M.base46.theme_toggle

oh, maybe because of the recent changes that siduck made.

Alexis12119 commented 3 months ago

I noticed that theme_toggle isn't updating.

Alexis12119 commented 3 months ago

siduck is now gonna fix that bug.

KevinNitroG commented 3 months ago

Alright so just keep the PR there :)) till he fix it