Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipes for transparent theme switching πŸ‘¨πŸ»β€πŸ³ #78

Open
AlejandroSuero opened this issue Jun 16, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@AlejandroSuero
Copy link
Contributor

Description

When using :CyberdreamToggleMode or theme.variant = "light" the text color makes it unreadable.

I will propose to use the dark variant of colours for at least the text if transparent is true.

Neovim version?

v0.10.0

What should happen?

I can read the text without problem.

What happened instead?

The text color makes it hard to read

Screenshot 2024-06-16 at 23 40 41 Screenshot 2024-06-16 at 23 45 25

Your configuration

{
    "scottmckendry/cyberdream.nvim",
    lazy = false,
    priority = 1000,
    config = function()
        require("cyberdream").setup({
            transparent = true,
            italic_comments = false,
            hide_fillchars = false,
            borderless_telescope = { border = false, style = "nvchad" },
            terminal_colors = true,
            theme = {
                variant = "light",
            },
        })
        vim.cmd("colorscheme cyberdream")
    end,
}
@AlejandroSuero AlejandroSuero added the bug Something isn't working label Jun 16, 2024
@scottmckendry
Copy link
Owner

This is expected behaviour. If you enable transparency, neovim is no longer responsible for rendering the background. This is handled by the terminal emulator.

I'd planned for this when I added the toggle option by triggering the CyberdreamToggleMode event. This allows users to execute custom code to update their terminal emulator settings if that's something that they support.

My long-term plan is to add some more recipes to the readme with some simple lua examples on how to achieve this with popular terminal emulators.

@AlejandroSuero
Copy link
Contributor Author

@scottmckendry okay, didn't know that was the expected behaviour. I don't personally use light themes so I thought it was unexpected.

@scottmckendry
Copy link
Owner

No worries @AlejandroSuero! I'll keep this open for now as a reminder to document this at some point.

The light theme can look quite nice with the transparent theme, so long and the terminal colors are also updated to something suitable. That's why I've added both dark and light variants of each extra to ensure this can be achieved with minimal effort.

@scottmckendry scottmckendry added documentation Improvements or additions to documentation enhancement New feature or request and removed bug Something isn't working labels Jun 17, 2024
@scottmckendry scottmckendry changed the title Day colorscheme non-readable when transparent Recipes for transparent theme switching πŸ‘¨πŸ»β€πŸ³ Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants