OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
wayland-compat low very-common DISPUTE

Get Neovim and tmux copies onto the Wayland clipboard

omarchyarchendeavouroscachyosmanjarohyprlandwayland
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Neovim's provider.txt confirms wl-copy is used only when $WAYLAND_DISPLAY is set, that tmux can hide OSC 52 detection, and the vim.g.clipboard = 'osc52' form. But the same priority list puts a tmux provider (used when $TMUX is set) ahead of osc52, and runtime/autoload/provider/clipboard.vim copies with tmux load-buffer -w - on tmux 3.2+. So inside tmux Neovim never reports 'No provider': the yank goes to a tmux buffer and reaches the system clipboard only if tmux forwards it with OSC 52. The record's cause said the opposite and is rewritten. tmux.1 confirms set-clipboard on|external|off needs the terminal's Ms capability and that copy-command feeds a bare copy-pipe. Omarchy's /usr/share/omarchy/config/tmux/tmux.conf has set -g set-clipboard on (line 74) and also set -as terminal-features ",*:clipboard" (line 81), and the plain-Arch branch omitted that second line, without which tmux may not forward to a terminal whose terminfo lacks Ms. Confirmed nvim, tmux and wl-clipboard are in /usr/share/omarchy/install/omarchy-base.packages, tmux 3.7c and neovim 0.12.5 installed. Not exercised over SSH.

The cause above was rewritten on 2026-10-05 to match this note; the fix was corrected by the audit itself.

Symptom

Yanking with "+y in Neovim gives clipboard: No provider. Try ":checkhealth" or ":h clipboard". Or it works in a plain terminal but not inside tmux or over SSH. Copying in tmux copy mode only fills tmux's own buffer and Ctrl+V in other apps pastes something older.

Cause

Neovim has no clipboard of its own. It looks for a tool in priority order: wl-copy/wl-paste only if $WAYLAND_DISPLAY is set, then a tmux provider if $TMUX is set, then OSC 52 if the terminal's support is detected. Without wl-clipboard, or over SSH where WAYLAND_DISPLAY is missing and OSC 52 detection fails, there is no provider and "+y errors. Inside tmux Neovim does not error: with WAYLAND_DISPLAY missing from the tmux server's environment (a server started from SSH or by a systemd user unit) it uses the tmux provider, which stores the text in a tmux buffer, and on tmux 3.2+ asks tmux to pass it on to the terminal. That only reaches the system clipboard if tmux forwards it with OSC 52, which needs set-clipboard not off and a terminal tmux knows can take the clipboard sequence. tmux copy mode works the same way: text stays in tmux's buffers unless set-clipboard sends it out through OSC 52 or a copy-pipe command runs a copy tool. Omarchy 4 ships wl-clipboard and a tmux config with both set -g set-clipboard on and set -as terminal-features ",*:clipboard", so on Omarchy this mostly appears over SSH or in a tmux server without the session environment.

Fix

**Install the tool (plain Arch).** Omarchy already has it.


sudo pacman -S --needed wl-clipboard

Inside Neovim, :checkhealth provider names the clipboard tool it found (wl-copy, tmux or osc52). Check the environment where Neovim runs:


echo "$WAYLAND_DISPLAY"    # empty inside the tmux server or over SSH = no wl-copy provider

**When WAYLAND_DISPLAY cannot be set (SSH, detached tmux)**, use OSC 52 through the terminal. In ~/.config/nvim/init.lua:


vim.g.clipboard = 'osc52'

**tmux on plain Arch** (tmux 3.2+). Either let OSC 52 through, as Omarchy's config does with both of these lines:


set -g set-clipboard on
set -as terminal-features ",*:clipboard"

or pipe copy mode into wl-copy explicitly:


set -s copy-command 'wl-copy'
bind -T copy-mode-vi y send -X copy-pipe-and-cancel

Reload with tmux source-file ~/.config/tmux/tmux.conf (or ~/.tmux.conf). If the tmux server was started before you logged into Hyprland, tmux kill-server and start it again from a terminal inside the session, so the server and everything in it has WAYLAND_DISPLAY.

Verify

Yank a line with "+yy in Neovim, then run wl-paste in another terminal on the desktop: the line prints. For tmux, copy in copy mode and paste with Ctrl+V into a browser.

Sources

neovim-tmux-yank-not-reaching-system-clipboard-wayland