Skip to content

v3.6

Choose a tag to compare

@brandonmrgich brandonmrgich released this 04 May 00:14
· 10 commits to main since this release

Tightens clipboard reliability for the common nvim-inside-tmux setup on macOS.

Clipboard

Yanks inside nvim-inside-tmux on macOS were reaching the system clipboard only when nvim's auto-detected pbcopy provider happened to work — which fails on re-attached tmux sessions, sessions with a stripped PATH, or after macOS pasteboard detachment. The yellow tmux highlight from copy-mode worked, but nvim yanks silently dropped.

core/options.lua now picks one of three clipboard modes:

  • $SSH_TTY set: clipboard left empty (unchanged) — yanks stay in unnamed register, no provider attempted.
  • $TMUX set, not SSH: force the OSC 52 provider via vim.ui.clipboard.osc52 (neovim 0.10+). Path becomes nvim → OSC 52 → tmux → terminal → system clipboard, robust against pbcopy/xclip auto-detection quirks.
  • Otherwise: nvim auto-detects (pbcopy on macOS, xclip/wl-copy on Linux).

Requirements when running inside tmux

  • set -g set-clipboard on in tmux — already added in dotfiles.
  • An OSC-52-capable terminal: iTerm2, kitty, WezTerm, Ghostty, alacritty all work. Apple Terminal.app does not — switch terminals or yanks won't reach the Mac clipboard.
  • iTerm2 specifically requires Preferences → General → Selection → Allow clipboard access via terminal control sequence to be enabled.

CLAUDE.md updated to describe all three modes.

Full changelog: v3.5...v3.6