From f63c87750ed8077b075abc5fe7a071ec7bbcefc0 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Thu, 9 Nov 2023 15:05:47 -0600 Subject: [PATCH] feat(nvim): use `osc52` copy for vim clipboard See https://github.com/neovim/neovim/pull/25872 --- dots/.config/nvim/lua/core/globals.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dots/.config/nvim/lua/core/globals.lua b/dots/.config/nvim/lua/core/globals.lua index c2b1b82c..7567393a 100755 --- a/dots/.config/nvim/lua/core/globals.lua +++ b/dots/.config/nvim/lua/core/globals.lua @@ -2,6 +2,18 @@ local g = vim.g local M = {} -M.setup = function() end +M.setup = function() + 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 return M