Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add background image continuation #3067

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
Loading
from
Open

Add background image continuation #3067

wants to merge 7 commits into from

Conversation

Lartrax
Copy link

@Lartrax Lartrax commented Mar 25, 2025

This pr relates to issue: #342 and pr: #2419.

This is a continuation on mysty0s pr.

Adds two new settings vim.g.neovide_background_image and vim.g.neovide_background_transparency.

What kind of change does this PR introduce?

  • Feature

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • No

Copy link
Member

@fredizzimo fredizzimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for attempting to continue this!

Note: I didn't review very carefully yet, due to so many basics things being broken and I did not check the code at all.


Use the `g:neovide_background_image` variable to set a background image for Neovide. It is set to a string url.

You can alter the background images transparency by changing the `g:neovide_background_transparency` variable. It takes a value ranging from 0.0 (transparent) to 1.0 (opaque).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be renamed to opacity to be consistent with the other _opacity settings. I also think that it would make sense to include image to avoid confusion. So, perhaps neovide_bgimage_opacity?

&screen_rect,
grid_scale,
)
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's something wrong here, probably with these changes, but it could be something else. Without setting any transparency option, or background image, the border becomes transparent

image

&screen_rect,
grid_scale,
)
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably also a problem with this code, the normal opacity setting does not work properly (the right is Neovide main)
image

Without a background image it does not function at all
image

&screen_rect,
grid_scale,
)
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rendering stops working after resizing the window with neovide_opacity set and maximizing the window
image

vim.g.neovide_background_image = "~/image.jpg"
```

Using a background image in conjunction with `g:neovide_opacity` can lead to some nice looking results. Especially when using a more subtle texture instead of a regular image.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to document that the feature requires either neovide_opacity or neovide_normal_opacity, otherwise the image will be hidden behind the background

@fredizzimo fredizzimo added this to the 0.16.0 milestone Apr 1, 2025
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

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.