Mofiqul / vscode.nvim

Neovim/Vim color scheme inspired by Dark+ and Light+ theme in Visual Studio Code
MIT License
695 stars 111 forks source link

Regression with merge of PR #144 #145

Open baco opened 1 year ago

baco commented 1 year ago

After merging PR #144 there is no way to undo the transparent setting. The corresponding color is lost.

If some flow of the config sets the background to transparent=true the bg property is set to NONE, setting back to transparent=false (for instance when using with a GUI, that doesn't uses composite) does nothing, and the color can not be retrieved again.

Use case:

In init.vim I have:

" Theming
let g:vscode_style = 'dark'
let g:vscode_transparent = v:true
let g:vscode_italic_comment = v:true

later, in ginit.vim:

lua <<EOF
    local c = require('vscode.colors').get_colors()
    require('vscode').setup({
        group_overrides = {
            Normal = { fg=c.vscFront, bg=c.vscBack }
        }
    })
    require('vscode').load()
EOF

I use this to have transparent bg on the terminal (which is also transparent and blends with the desktop wallpaper); but on GUIs, which loaded ginit.vim later on, reset it to c.vscBack because the background of the GUI's window would be black otherwise.

With the current modification, .get_colors() gives back the table of colors modified by the setting transparent=true in the first config file and there is no other way to reach the original table of colors to re-use vscBack.

Mofiqul commented 1 year ago

@baco – I think instead of modifying the table for transparent background, what we could do is highlight the Normal group background with None and keep the table as it is. But if the user overrides the color, then it makes sense to modify the table.

baco commented 11 months ago

Is there any progress on the proposed solution?

baco commented 7 months ago

@baco – I think instead of modifying the table for transparent background, what we could do is highlight the Normal group background with None and keep the table as it is. But if the user overrides the color, then it makes sense to modify the table.

Any update on this issue?