Move custom modules
This commit is contained in:
parent
dde8a5ed26
commit
383bf939b9
4 changed files with 2 additions and 4 deletions
20
lua/custom/plugins/ocs52.lua
Normal file
20
lua/custom/plugins/ocs52.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
'ojroques/nvim-osc52',
|
||||
event = 'VeryLazy',
|
||||
opts = { max_length = 0, silent = true },
|
||||
config = function(_, opts)
|
||||
require('osc52').setup(opts)
|
||||
|
||||
-- Send *any* yank to the local clipboard automatically
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
if vim.v.event.operator == 'y' then
|
||||
require('osc52').copy_register(vim.v.event.regname == '' and '"' or vim.v.event.regname)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Optional: explicit mappings
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>y', require('osc52').copy_visual, { desc = 'Yank→local clipboard' })
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue