2023-02-12 12:36:50 +01:00
|
|
|
if not require("ambroisie.utils").is_ssh() then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local function copy(lines, _)
|
2023-05-06 19:58:30 +02:00
|
|
|
require("osc52").copy(table.concat(lines, "\n"))
|
2023-02-12 12:36:50 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
local function paste()
|
2023-05-06 19:58:30 +02:00
|
|
|
return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") }
|
2023-02-12 12:36:50 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
vim.g.clipboard = {
|
2023-05-06 19:58:30 +02:00
|
|
|
name = "osc52",
|
|
|
|
copy = { ["+"] = copy, ["*"] = copy },
|
|
|
|
paste = { ["+"] = paste, ["*"] = paste },
|
2023-02-12 12:36:50 +01:00
|
|
|
}
|