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

Not compatible with neovide #17

Closed
Tracked by #6
nick4tech opened this issue Oct 4, 2022 · 73 comments · Fixed by #536 or #639
Closed
Tracked by #6

Not compatible with neovide #17

nick4tech opened this issue Oct 4, 2022 · 73 comments · Fixed by #536 or #639
Labels
upstream Issue is caused by a dependency (like Neovim)

Comments

@nick4tech
Copy link

nick4tech commented Oct 4, 2022

Describe the bug
I've installed the plugin with packer. Used one of the config recipes from the wiki but I can't get it to work.

To Reproduce
Install with Packer
Copy the config recipe from the wiki:

  use {
    'folke/noice.nvim',
    event = "VimEnter",
    requires = {
      -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
      "MunifTanjim/nui.nvim",
      "rcarriga/nvim-notify",
      "hrsh7th/nvim-cmp",
    },
    config = function()
      require("noice").setup({
        views = {
          cmdline_popup = {
            border = {
              style = "none",
              padding = { 2, 3 },
            },
            filter_options = {},
            win_options = {
              winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
            },
          },
        },
        routes = {
          {
            filter = {
              event = "cmdline",
              find = "^%s*[/?]",
            },
            view = "cmdline",
          },
        },
      })
    end
  }

I also tried without lazy loading and still didn't work. Also tried running Noice enable, didn't work.

Expected behavior
I'd expect the command line to appear in a popup on the center of the screen.

Screenshots
image

This is how my command line looks.

Noice log
Noice log is empty.
Here are the stats:
image

@nick4tech nick4tech changed the title Can't get it work Can't get it to work Oct 4, 2022
@folke
Copy link
Owner

folke commented Oct 4, 2022

In the route, you specify it needs to go to the cmdline. If you want the popup, change this to cmdline_popup.
You also wont have syntax highlighting, since you removed the opts with filtetype vim.

Just remove the routes in your config.

@folke
Copy link
Owner

folke commented Oct 4, 2022

Nevermind, that's for the search cmdline

@folke
Copy link
Owner

folke commented Oct 4, 2022

Just tried your config and it works for me.
Are you using Neoivm 0.8.0? Do you use a gui?

@nick4tech
Copy link
Author

So I removed all the configs and just stuck to the default. I think I know what's happening. It seems to be incompatible with neovide, which the gui I use. I tried running it from nvim in terminal and it worked.

@nick4tech nick4tech changed the title Can't get it to work Not compatible with neovide Oct 4, 2022
@Shougo
Copy link
Contributor

Shougo commented Oct 5, 2022

Please see this.

#10

@folke
Copy link
Owner

folke commented Oct 5, 2022

For me the popup etc does work in the latest Neovide version, but there's another issue with :messages that crashes Neovide.

I'll keep this open for now and will add it to the tracking issue

@folke folke added bug Something isn't working upstream Issue is caused by a dependency (like Neovim) labels Oct 18, 2022
@clason
Copy link

clason commented Oct 24, 2022

Is this with our without --multigrid?

folke added a commit that referenced this issue Oct 24, 2022
@alerque
Copy link

alerque commented Oct 24, 2022

I run Neovide with --multigrid and am not able to use noice with it.

@folke
Copy link
Owner

folke commented Oct 24, 2022

So I just tested again with the latest version of Neovide, Neovim & Noice, and everything seems to be working now :)

I pushed a change, so that Noice still shows a warning of running inside Neovide, but it will start.

Would be great if others can test as well to see that everything is working inside Neovide now.

@clason with --multigrid, something is broken. No errors, but Noice can't seem to override the cmdline.

@folke
Copy link
Owner

folke commented Oct 24, 2022

@alerque try without multigrid. It seems to work fine for me

@clason
Copy link

clason commented Oct 24, 2022

@clason with --multigrid

That would be my expectation as well; multigrid has a number of issues with newer TUI functionality.

@alerque
Copy link

alerque commented Oct 24, 2022

@folke What's the point? When I want to forego smooth scrolling to get noice features I just run NeoVIM in a terminal.

@folke
Copy link
Owner

folke commented Oct 24, 2022

@alerque the point was to test and see if that works for you as well, so we can narrow down the issue to --multigrid

@clason
Copy link

clason commented Oct 24, 2022

In any case, can I suggest turning the hard error into a warning, even with multigrid? A lot of features still work fine.

@alerque
Copy link

alerque commented Oct 24, 2022

Sorry @folke I thought that had been determined already.

Yes if I disable --multigrid it seems to run fine.

@folke
Copy link
Owner

folke commented Oct 24, 2022

@clason did that already :)

@james2doyle
Copy link

james2doyle commented Oct 24, 2022

Just tested with the latest build of Neovide (not using multigrid) from the main branch with the latest changes on noice and it seems to work:

Screen Shot 2022-10-24 at 11 27 32 AM

There is this error when opening the command prompt

Screen Shot 2022-10-24 at 11 29 00 AM

@folke
Copy link
Owner

folke commented Oct 24, 2022

@james2doyle that doens't seem right. Thats the call to vim.treesitter.

It seems like your installation (runtime directory) is messed up.

@james2doyle
Copy link

Ah ok. I will look into that. I used to build from source before 0.8 was out so I am sure it is a holdover from the mess I made

@clason
Copy link

clason commented Oct 24, 2022

Very likely then. Clean out your runtime directory and install again.

@james2doyle
Copy link

Got it. I had a custom set ENV VAR for it and once it was removed it worked perfectly

@ryo33
Copy link

ryo33 commented Feb 20, 2023

I've opened neovim/neovim#22344 for this.

@alloc33
Copy link

alloc33 commented Feb 26, 2023

How to disable this notification?
image

@alloc33
Copy link

alloc33 commented Feb 26, 2023

For me everything is ok so far... I don't know guys how you can use --multigrid with neovim 0.8+. Hope this bug will be fixed soon. I love Neovide's smooth scroll + smooth text input. No any other plugin can do this.

@alloc33
Copy link

alloc33 commented Feb 26, 2023

Ok, it crahes for me if I do ciB for example. Strange...

@Ciel-MC
Copy link

Ciel-MC commented Feb 26, 2023

How to disable this notification? image

You can't, it's something to keep in mind

Ok, it crahes for me if I do ciB for example. Strange...

Yeah, we have discovered that neovide crashes if multiple lines were deleted and the resulting buffer isn't empty, see neovide's issue on this for more info.

@alloc33
Copy link

alloc33 commented Feb 26, 2023

How to disable this notification? image

You can't, it's something to keep in mind

Ok, it crahes for me if I do ciB for example. Strange...

Yeah, we have discovered that neovide crashes if multiple lines were deleted and the resulting buffer isn't empty, see neovide's issue on this for more info.

Is it possible to fix with noice settings? I mean deletion bug

@folke
Copy link
Owner

folke commented Feb 27, 2023

@xbladesub first of all, you should be running Neovim Nightly, to minimize any segfaults.

That notification window you see is nvim-notify. Just disable it if you don't want that

@alloc33
Copy link

alloc33 commented Feb 27, 2023

@xbladesub first of all, you should be running Neovim Nightly, to minimize any segfaults.

That notification window you see is nvim-notify. Just disable it if you don't want that

I have tree-sitter issues with rust buffers on nightly neovim. I just disabled everything except cmdline and it's ok, can work. But still crashes sometimes while starting to search with / )). Btw can't disable notify completely, noice config just ignores this

@HusuSama
Copy link

HusuSama commented Feb 28, 2023

Maybe it was dashboard that crashed noice, not neovide.
BUT
They all work if you don't use neovide.
image
image

@alloc33
Copy link

alloc33 commented Mar 24, 2023

any update on this guys?

@luisiacc
Copy link

Gonna add this in here, maybe it's related, It has also been mentioned on this thread, same crash as with ciB:

ci{ causes neovide to exit when using folke/noice plugin

@ZOI-dayo
Copy link

When I excute =G, neovide also crush.

@ryo33
Copy link

ryo33 commented Jun 27, 2023

neovim/neovim#22344 (comment)
Can we stop triggering redraw events within the lua callback as this comment? I know the redraw are inherently needed, but I imagine there are workarounds like deferring them (by queueing?) or something.

References:
neovide/neovide#1751 (comment)
neovide/neovide#1751 (comment)

@fredizzimo
Copy link

It has been reported here for example neovide/neovide#1737 (comment) that disabling the messages stops the crashes.

This is constantly causing headaches for Neovide users, since it's not clear for them what's causing the problem. @folke, would it be possible to disable that automatically with a warning or something, if Neovide is running? You can check with if vim.g.neovide. Of course that's just a temporary solution until the actual problem is fixed.

On the Neovide side, there's not much we can do, since the event we receive from Neovim is completely malformed.

@folke
Copy link
Owner

folke commented Jul 17, 2023

@fredizzimo that's already the case.

This message is shown for users running noice inside Neovide:
Noice may not work correctly with Neovide. Please see #17

fyi: I'm not sure what is diffrerent with other GUIs but for the others I tested, Noice does not seem to be causing issues. It's been a while since I tested in other GUIs though, so maybe some upstream Neovim issues might have been introduced in the meantime.

@folke
Copy link
Owner

folke commented Jul 17, 2023

@ryo33 it's unfortunately not that simple. The big issue is that noice implements ui_attach, so noice has to be able to draw itself during/right before a blocking event. Otherwise there are a lot of cases where the cmdline would not be visible for example while it should. Using vim.schedule in those cases wouldn't work, since that would be delayed till whatever blocking event resolves.

@folke
Copy link
Owner

folke commented Jul 17, 2023

I'm pretty confident I was able to fix Noice with Neovide.

It should even work properly with --multigrid enabled now.

The fix turned out to be easy and straightforward.

Basically, Noice stops propagating events handled by Noice to other GUis that may be attached. (messages, cmdline and popupmenu, unless they're disabled in the Noice config)

Would be great if others can confirm this no longer crashes Neovide.

@edjeffreys
Copy link

Would be great if others can confirm this no longer crashes Neovide

Can confirm Neovide no longer crashes 🎉 thanks for that fix @folke!

@infinite-ops
Copy link

Fixes it for me too! Thank you!

@wvffle
Copy link

wvffle commented Jul 18, 2023

Works fine even for --multigrid but the blur isn't working for noice popups

@Ciel-MC
Copy link

Ciel-MC commented Jul 19, 2023

I just tried disabling Noice while using Neovide and uhhh, this happened after I opened and closed a monorepo.nvim window. I think it has something to do with nvim-cmp for the cmdline
image
It doesn't seem to happen on regular nvim.

Edit: It is a local copy because I wanted to my own spinner, but it is updated.

@folke
Copy link
Owner

folke commented Jul 19, 2023

@Ciel-MC that doesn't have anything to do with Neovide I think.
What caused this error? How did you disable noice?

@Ciel-MC
Copy link

Ciel-MC commented Jul 19, 2023

@Ciel-MC that doesn't have anything to do with Neovide I think.
What caused this error? How did you disable noice?

I disablo it with :NoiceDisable

I'm not sure, I suspect it is due to cmp trying to trigger completion?

I think it's to do with Neovide because it doesn't happen when I use the terminal

@lost22git
Copy link

lost22git commented Jul 25, 2023

Also works fine under fvim 🤩

Screenshot 2023-07-26 041025

Screenshot 2023-07-26 041405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issue is caused by a dependency (like Neovim)
Projects
None yet
Development

Successfully merging a pull request may close this issue.