registers.nvim
registers.nvim copied to clipboard
"Clipboard: no provider" error message when used on headless hosts
When using this awesome plugin on a headless machine that's not running X11 or wayland (or any clipboard proxying SSH magic), the following error message is displayed by neovim (version 0.6.1) when opening the registers.nvim UI:
clipboard: No provider. Try ":checkhealth" or ":h clipboard".
clipboard: No provider. Try ":checkhealth" or ":h clipboard".
Press ENTER or type command to continue
Nothing in my configuration sets the clipboard, but it seems to be upset that an X11/wayland clipboard tool is not available. Ideally, the plugin should continue without warning and use the neovim internal clipboard
Steps to reproduce:
- Create a chroot or VM and install latest nvim
- Add registers.vnim to config
- Try to open registers panel without installing X11 or wayland
Let me know if there is anything else I can do to help with this. Thanks!
I've looked into it, but I couldn't find a way to detect whether a clipboard register is available. It would be greatly appreciated if anyone has any tips regarding detecting this.
We could avoid this error message by disabling clipboard totally.
Try to adding following snippet to init.vim:
let g:clipboard = {"name": "void", "copy": {}, "paste": {}}
let g:clipboard.copy["+"] = {-> v:true}
let g:clipboard.paste["+"] = {-> []}
let g:clipboard.copy["*"] = g:clipboard.copy["+"]
let g:clipboard.paste["*"] = g:clipboard.paste["+"]
Can a setting be added to turn off the clipboard register handling by the plugin? Or better if '+' is not listed in the g:registers_show variable then the plugin doesn't deal with the clipboard register.
Actually removing '+*' from g:registers_show config does seem to work. So kindly ignore the above comment and thanks!