mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 04:21:03 +00:00
osc52 for remote env clipboard
This commit is contained in:
parent
78786ce1aa
commit
e24151ddf9
2 changed files with 20 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-lint": { "branch": "master", "commit": "d1118791070d090777398792a73032a0ca5c79ff" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a2a277114dbb93e98f04b5087a9b832918b7da15" },
|
||||
"nvim-osc52": { "branch": "main", "commit": "04cfaba1865ae5c53b6f887c3ca7304973824fb2" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "bb83a676128d95c865e40ba71376d883bdadec14" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "227165aaeb07b567fb9c066f224816aa8f3ce63f" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||
|
|
|
|||
19
lua/plugins/osc52.lua
Normal file
19
lua/plugins/osc52.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
{
|
||||
"ojroques/nvim-osc52",
|
||||
config = function()
|
||||
require("osc52").setup({
|
||||
max_length = 0, -- Maximum length of selection (0 for no limit)
|
||||
silent = false, -- Disable message on successful copy
|
||||
trim = false, -- Trim surrounding whitespaces before copy
|
||||
})
|
||||
local function copy()
|
||||
if (vim.v.event.operator == "y" or vim.v.event.operator == "d") and vim.v.event.regname == "" then
|
||||
require("osc52").copy_register("")
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue