-
Notifications
You must be signed in to change notification settings - Fork 117
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
Background transparency setting broken #71
Comments
Now you can achieve the same using the setup function. Just overrides the group_overrides = {
-- this supports the same val table as vim.api.nvim_set_hl
-- use colors from this colorscheme by requiring vscode.colors!
Normal = { fg = c.vscFront, bg = 'NONE' },
} You can also do |
I understand, but the setup function is Lua. For the time being I have not migrated my Perhaps you are suggesting I include something like |
It's because once you set For your use case, you can use local c = require('vscode.colors')
require('vscode').setup({
transparent = false,
group_overrides = {
Normal = { fg=c.vscFront, bg= (vim.g.colors_name and vim.g.colors_name == 'vscode') and c.vscBack or c.vscNone},
}
}) |
@yochem also added backward compitibility. your existing setup supposed to work but sadly its not. In my setting its working. I am so sorry that I am currently too busy to look into. If someone fix I will merge it otherwise have to wait a bit. |
Ok, many things happening here:
- if vim.g.vscode_transparent then
- colors.vscBack = 'NONE'
- end
+ transparent = vim.g.vscode_transparency == 1,
...
+ if opts.transparent then
+ opts.color_overrides.vscBack = 'NONE'
+ end
I still don't know why re-setting the option and the syntax wouldn't restore the color, because it seems to be doing almost the same in behind ( @yochem, which is gonna be, |
Hi, sorry for this! I based the backwards compatibility on the README, and found an error in it: In the lua part the variable has a different name than in the vim part (transparency vs transparent). Also, both look to be using 1/0. The code however just evaluated the to-lua-converted |
To comply to the documentation and code before my PR, I will only change
Might this be because |
Wouldn't be as easy as: transparent = vim.g.vscode_transparency == true or vim.g.vscode_transparency == 1,
italic_comments = vim.g.vscode_italic_comment == true or vim.g.vscode_italic_comment == 1,
|
@Mofiqul I've tried a variant of this (has the same outcome), putting in if exists('g:colors_name') && g:colors_name == 'vscode'
let g:vscode_transparent = v:false
lua <<EOF
local c = require('vscode.colors')
require('vscode').setup({ group_overrides = { Normal = { fg=c.vscFront, bg=c.vscBack } } })
EOF
endif Both variants work (yours and mine), but with the same weird effect. After restoring the background color, the front color for spaces become more brilliant than they should: Instead, if I didn't make the background transparent on Any idea on what's happening there and how could I solve that? |
Until 2 days ago I used to have the following working settings:
init.vim
:but, as I only wanted background transparency on terminals and not on other UIs, I also had:
ginit.vim
:all working like a charm. Transparent background on terminals default VSCode-like background otherwise.
After a recent merge, both settings stopped working. The documentation about them is gone, and there is no indication on how to keep having the settings in vim-script as it used to.
The text was updated successfully, but these errors were encountered: