r/voidlinux 14d ago

Trouble with Neovim

I just installed Void and got Neovim with xbps, and I have two major problems with it that I didn't have on Fedora.

First, it's sluggish for no reason. Even when I launch it with nvim -u NONE, basic things like moving the cursor and scrolling the window are significantly slower than they were when I was using Fedora and also slower than any other app.

Second, I can't copy things to the system clipboard. When I do "+yy it says "No provider". In ~/.config/nvim/init.lua I have a line that says vim.opt.clipboard:append("unnamedplus") which worked on Fedora, but that clearly doesn't work anymore. (Solved it by downloading wl-clipboard)

If anybody has any clue why these things are happening let me know

7 Upvotes

13 comments sorted by

5

u/p001b0y 14d ago

Void doesn’t install a clipboard provider when installing x11 or Wayland unless specified. You need to do a sudo xbps-install -S xclip or a sudo xbps-install -S wl-clipboard to get it.

I’m not sure why it would be running slow though.

1

u/y0shii3 14d ago

Seems like Void packages a bunch of clipboard managers. Are any of them particularly better or worse than the others? Do I have to change anything in my Neovim config to make them work?

1

u/amenbreakfast 14d ago

no, nvim picks them up automatically if they're installed. i'm sure at some point there was a reason for xclip vs xsel but i've long since forgotten about it. also, if you're gonna use treesitter you'll have to install tree-sitter-cli

1

u/p001b0y 14d ago

The only real differences, I think, is that xclip can read directly from a file while xsel requires stdin redirection. Also, xclip can output to a file.

1

u/y0shii3 13d ago

I have tree-sitter-cli, but :checkhealth still gives an error saying I need it

3

u/Simple_Hamster_4096 13d ago

Do you encounter the same performance issues with VI or Vim?

1

u/y0shii3 13d ago

No, vi is fine

1

u/ReyZ82 13d ago

In case you are interested. I got a blazing fast neovim zero-plugin setup which works on all my distros without issues. Even on my old potato office laptop. Feel free to check out https://github.com/Rouzihiro/dotfiles/tree/main/config%2F.config%2Fnvim

1

u/juipeltje 13d ago

What terminal emulator are you using? Have you tried a different one? Maybe something's wonky with whichever one you're using.

1

u/y0shii3 13d ago edited 10d ago

Ghostty. I used Ghostty with Fedora too and Neovim worked fine then

Actually, the Ghostty xbps package is a year out of date and the unofficial AppImage straight-up doesn't work (probably a musl compatibility issue), so maybe the issue is fixed in Ghostty 1.3, but I wouldn't know since I can't run it.

1

u/TurtleGraphics64 13d ago

I think a lot of folks are using Neovim on Void without issue. Can you try a non-GPU-accelerated or other terminal client just to determine if that could potentially be the issue? for example, i'm on i3, with X11, no issues with neovim. also, try :checkhealth. in answer to your other question, xsel and xclip work well with neovim! you probably want to add this to your init.lua vim.opt.clipboard:append { 'unnamed', 'unnamedplus' }

1

u/badgerbang 13d ago

Anyone else running void and ghostty? this would be a deal breaker for me regarding installing void. Nvim is life :D

1

u/y0shii3 12d ago

Do not use Void if you need Ghostty and don't want to compile it from source. The unofficial AppImage that even claims to work on musl systems does not work, and the xbps package is a year out of date and therefore you will not get any help if you have problems with it like me.