9

after uninstalling latest and installed nightly I cannot paste from clipboard, double checked my init.vim for set clipboard=unnamedplus

any suggestion?

update 21st May

following Matt's comment, running :checkhealth provider outputs

health#provider#check
========================================================================
## Clipboard (optional)
  - WARNING: No clipboard tool found. Clipboard registers (`"+` and `"*`) will not work.
    - ADVICE:
      - :help clipboard

so I run sudo apt-get install -y xclip

and works well (even with wayland!)

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

Francesco Iapicca
  • 2,618
  • 5
  • 40
  • 85

1 Answers1

7

Neovim doesn't have any code to access OS clipboard directly (or to process X Window events). Instead it delegates to external utilities/plugins. You're expected to execute :checkhealth command to see the current state. If you don't have any supported tool on your PATH then you'll not be able to access the clipboard.

As a shameless plug, I wrote plugin that consists of dynamic library providing direct access to clipboard. This is to avoid extra process creation for every copy/paste operation (btw. setting clipboard=unnamed[plus] is bad for more than just this single reason). However, the library must be built from source before use.

As of Wayland, its IPC mechanism is clearly different from X but at least in GNOME or KDE you may expect both selections being synchronized transparently. Otherwise you need specific utils to access Wayland clipboard, such as wl-copy/wl-paste.

Matt
  • 13,674
  • 1
  • 18
  • 27