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

Trouble setting transparent background in lazy #212

Open
vaskark opened this issue Dec 10, 2024 · 10 comments
Open

Trouble setting transparent background in lazy #212

vaskark opened this issue Dec 10, 2024 · 10 comments

Comments

@vaskark
Copy link

vaskark commented Dec 10, 2024

Here is what I have in my papercolor.lua:

return {
  "NLKNguyen/papercolor-theme",
  config = function()
    vim.g.PaperColor_Theme_Options = {
      'theme': {
        'default': {
          'transparent_background': 1
         }
       }
     }
  end,
}

This is the error on startup:

/home/vaskark/.config/nvim/lua/plugins/papercolor.lua:5: '}' expected (to close '{' at line 4) near ':'

I really can't see what I'm missing. Can anyone offer help?
Thanks.

@ANGkeith
Copy link

ANGkeith commented Jan 6, 2025

you're having some syntax issue

return {
  "NLKNguyen/papercolor-theme",
  config = function()
    vim.g.PaperColor_Theme_Options = {
      theme = {
        default = {
          transparent_background = 1,
        },
      },
    }
  end,
}

@vaskark
Copy link
Author

vaskark commented Jan 6, 2025

@ANGkeith

I tried your suggestion. Still doesn't work.

@ANGkeith
Copy link

ANGkeith commented Jan 6, 2025

Still doesn't work.

could you elaborate more ?

@vaskark
Copy link
Author

vaskark commented Jan 6, 2025

No tranparency.

@ANGkeith
Copy link

ANGkeith commented Jan 7, 2025

hmm,

  • your're no longer getting any error message right ?

  • currently is your terminal background transparent ?

ie. something like that
image

the transparent_background setting here means it'll take the bg color of your terminal

because my terminal color is white to begin with... this is how the above config will look like
image

if it still does'nt work for you ..., i am not sure already. I doubt its an issue in the plugin...

@vaskark
Copy link
Author

vaskark commented Jan 7, 2025

No, the error message is gone.
No, the terminal background is not transparent when using the papercolor theme. All the other themes that support transparency are transparent as per my configuration.

2025-01-07-095503_hyprshot

@ANGkeith
Copy link

ANGkeith commented Jan 7, 2025

fork this patch/ patch them locally
https://github.com/NLKNguyen/papercolor-theme/pull/211/files

it should fix the issue

(i am assuming your're using nvim >= 0.10)

@vaskark
Copy link
Author

vaskark commented Jan 7, 2025

It worked! Many thanks.
Will this fix be added to the main branch soon?

Edit: Wait. Lazy is now giving me errors about the edits I made. How can I make these changes permanent?

@ANGkeith
Copy link

ANGkeith commented Jan 8, 2025

Will this fix be added to the main branch soon?

not sure.. maintainer seemed to be rather inactive for the past few month...

Edit: Wait. Lazy is now giving me errors about the edits I made. How can I make these changes permanent?

not sure if there's other way.. you can fork it and reference it vaskark/papercolor-theme

@vaskark
Copy link
Author

vaskark commented Jan 8, 2025

Great idea. Thanks for all your help..

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