neovide icon indicating copy to clipboard operation
neovide copied to clipboard

Neovide not responding to configurations set in init.lua

Open Ktoks opened this issue 1 year ago • 9 comments

Describe the bug Neovide isn't responding to configuration changes upon reload in an init.lua file.

To Reproduce

  1. Make any changes to configuration.
  2. Start Neovide.

Expected behavior The configuration should be noticeably different with many configurations.

Screenshots Screenshot from 2024-05-31 17-35-42

Desktop:

  • OS - Pop!_OS 22.04
  • Kernel - 6.8.0-76060800daily20240311-generic
  • Neovide Version - 0.13.1
  • Neovim Version - v0.10.1-dev-34+g58e1ef2f6

Please run neovide --log and paste the contents of the .log file created in the current directory here: neovide_rCURRENT.log

Additional context The image above both shows the problem - transparency when my Opacity is set to 1.0, and it shows my init.lua file.

Ktoks avatar May 31 '24 23:05 Ktoks

I think you forgot to tell how you are starting Neovim, because it does not seem to be started by Neovide, due to the lack of the line Starting neovim with in the logs. Neovide also gets assigned channel id 3 instead of 1, suggesting that something else is already attached.

This probably means that your init.lua has already been run when Neovide starts and at that point vim.g.neovide won't be set, so none of your options will apply.

You can either remove the if vim.g.neovide check, or if you you are starting with --listen, make sure that you don't add the --headless option, since then it won't wait for the UI to attach before loading the configuration.

fredizzimo avatar Jun 01 '24 01:06 fredizzimo

neovide --log is the exact command I used just now... New log as a result from that command(same result). neovide_rCURRENT.log

Ktoks avatar Jun 01 '24 19:06 Ktoks

This time the log shows that the settings were changed 11 time, so I believe that everything else than the transparency applied.

Window transparency and full screen are incompatible due the optimizitions the compositor does, so there's nothing to show below the window, I recommend maximizing the window instead.

fredizzimo avatar Jun 01 '24 20:06 fredizzimo

You are right, I do see the other settings are now working, the transparency is still not fixed even when I set full screen to false and put --maximized in the command line. neovide_rCURRENT.log

Ktoks avatar Jun 01 '24 20:06 Ktoks

The neovide_transparency variable is a bit poorly named https://neovide.dev/configuration.html#transparency, it should actually be neovide_opacity', so with your value of 1.0forneovide_transparency` the window will be fully opaque.

fredizzimo avatar Jun 01 '24 21:06 fredizzimo

The neovide_transparency variable is a bit poorly named https://neovide.dev/configuration.html#transparency, it should actually be neovide_opacity', so with your value of 1.0forneovide_transparency` the window will be fully opaque.

Same result with opacity instead of transparency. I've even tried using Vim script instead of Lua

Ktoks avatar Jun 07 '24 21:06 Ktoks

I mean the value should be less than one for a transparent window, and 0 for a completely transparent one.

fredizzimo avatar Jun 07 '24 23:06 fredizzimo

@Ktoks, did you try if neovide_transparency=0 makes a difference? I don't see why it shouldn't. But your current setting neovide_transparency=1 should not, since it's already the default.

fredizzimo avatar Jun 15 '24 09:06 fredizzimo

I created this Neovim issue

  • https://github.com/neovim/neovim/issues/29634

The best workaround for now is to remove the if vim.g.neovide check, if you use neovide --server

Also, see this issue

  • https://github.com/neovide/neovide/issues/1868

fredizzimo avatar Jul 09 '24 18:07 fredizzimo