diff --git a/lua/config/options.lua b/lua/config/options.lua index 6881000..4cf8b72 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -50,6 +50,27 @@ if vim.fn.has('wsl') == 1 then opt.guifont = 'RobotoMono Nerd Font:h10' elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont = 'Iosevka NFM:h11' + if vim.env.SSH_TTY or vim.env.SSH_CLIENT or vim.env.SSH_CONNECTION then + function no_paste(reg) + return function(lines) + -- Do nothing! We can't paste with OSC52 + end + end + + 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('*'), + ['+'] = no_paste('+'), -- Pasting disabled + ['*'] = no_paste('*'), -- Pasting disabled + }, + } + end else -- opt.guifont = 'Hack Nerd Font:h10' -- opt.guifont = 'JetBrainsMono Nerd Font:h10'