feat(neovim): add OSC 52 clipboard support for SSH sessions

Lets "+y/"+p sync with the system clipboard over SSH (Termius -> VPS/homelab)
without relying on a local clipboard provider.
This commit is contained in:
emmatherock committed 2026-09-05 20:01:42 -03:00
1 parent 5d9cd9d835
commit 0aa0cc0e0d
1 file changed
+18
+18
View File
@@ -16,6 +16,24 @@
globals.mapleader = " ";
# --- System clipboard over OSC 52, so "+y / "+p work over SSH
# (Termius -> VPS/homelab) without a local clipboard provider.
# Requires Neovim 0.10+ for vim.ui.clipboard.osc52; confirmed
# present (Neovim 0.12.5 on the pinned nixpkgs as of 2026-09).
extraConfigLua = ''
vim.g.clipboard = {
name = "OSC 52",
copy = {
["+"] = require("vim.ui.clipboard.osc52").copy("+"),
["*"] = require("vim.ui.clipboard.osc52").copy("*"),
},
paste = {
["+"] = require("vim.ui.clipboard.osc52").paste("+"),
["*"] = require("vim.ui.clipboard.osc52").paste("*"),
},
}
'';
opts = {
number = true;
relativenumber = true;