add repolink and osc52 support just for copying
This commit is contained in:
parent
fde7281e01
commit
dd079bb9f9
3 changed files with 28 additions and 0 deletions
|
@ -88,6 +88,9 @@ function vim.getVisualSelection()
|
|||
end
|
||||
end
|
||||
|
||||
keymap("n", "<leader>ghl", "<cmd>RepoLink<CR>", opts)
|
||||
keymap("x", "<leader>ghl", ":RepoLink<CR>", opts)
|
||||
|
||||
keymap("v", "<space>sw", function()
|
||||
local tb = require("telescope.builtin")
|
||||
local text = vim.getVisualSelection()
|
||||
|
|
|
@ -15,3 +15,19 @@ vim.opt.foldmethod = "expr"
|
|||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldenable = false
|
||||
vim.opt.exrc = true
|
||||
function no_paste(reg)
|
||||
return function(lines)
|
||||
end
|
||||
end
|
||||
|
||||
vim.g.clipboard = {
|
||||
name = 'OSC 52',
|
||||
copy = {
|
||||
['+'] = require('vim.ui.clipboard.osc52').copy('+'),
|
||||
['*'] = require('vim.ui.clipboard.osc52').copy('*'),
|
||||
},
|
||||
paste = {
|
||||
['+'] = no_paste('+'),
|
||||
['*'] = no_paste('*'),
|
||||
},
|
||||
}
|
||||
|
|
9
lua/plugins/repolink.lua
Normal file
9
lua/plugins/repolink.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"9seconds/repolink.nvim",
|
||||
opts = {
|
||||
use_full_commit_hash = true,
|
||||
bang_register = "+",
|
||||
}
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue