mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-31 15:19:38 +02:00
fix(options): dont set clipboard in an SSH session, so that OSC52 can be enabled (when supported)
This commit is contained in:
parent
78e6405f90
commit
1c9f4160a2
2 changed files with 7 additions and 24 deletions
|
@ -113,26 +113,3 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
|||
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
|
||||
end,
|
||||
})
|
||||
|
||||
-- Copy/Paste when using ssh on a remote server
|
||||
-- Only works on Neovim >= 0.10.0
|
||||
if vim.clipboard and vim.clipboard.osc52 then
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
group = augroup("ssh_clipboard"),
|
||||
callback = function()
|
||||
if vim.env.SSH_CONNECTION and vim.clipboard.osc52 then
|
||||
vim.g.clipboard = {
|
||||
name = "OSC 52",
|
||||
copy = {
|
||||
["+"] = require("vim.clipboard.osc52").copy,
|
||||
["*"] = require("vim.clipboard.osc52").copy,
|
||||
},
|
||||
paste = {
|
||||
["+"] = require("vim.clipboard.osc52").paste,
|
||||
["*"] = require("vim.clipboard.osc52").paste,
|
||||
},
|
||||
}
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue