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

Regression with merge of PR #144 #145

Open
baco opened this issue Jul 4, 2023 · 3 comments
Open

Regression with merge of PR #144 #145

baco opened this issue Jul 4, 2023 · 3 comments

Comments

@baco
Copy link
Contributor

baco commented Jul 4, 2023

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
Copy link
Owner

Mofiqul commented Jul 5, 2023

@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
Copy link
Contributor Author

baco commented Sep 22, 2023

Is there any progress on the proposed solution?

@baco
Copy link
Contributor Author

baco commented Jan 22, 2024

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants