1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
local M = {} function M.get_provider(cfg) local clipboard = require('vim.ui.clipboard.osc52') return { read = function() return false end, write = function(_, reg) clipboard.copy(cfg.register)(reg.lines) return true end, } end return M