let ctrl+c copy work over ssh

This commit is contained in:
2026-09-06 23:24:54 -04:00
parent 5d8ec77f80
commit 1769265e3f
+11
View File
@@ -7,3 +7,14 @@ require "nvchad.options"
vim.g.lua_snippets_path = { vim.fn.stdpath "config" .. "/snippets" } vim.g.lua_snippets_path = { vim.fn.stdpath "config" .. "/snippets" }
-- route "+/* registers through the terminal with OSC 52 when connected over SSH,
-- since xclip/wl-copy on the server can't reach the local clipboard
if vim.env.SSH_TTY or vim.env.SSH_CONNECTION then
local osc52 = require "vim.ui.clipboard.osc52"
vim.g.clipboard = {
name = "osc52",
copy = { ["+"] = osc52.copy "+", ["*"] = osc52.copy "*" },
paste = { ["+"] = osc52.paste "+", ["*"] = osc52.paste "*" },
}
end