This commit is contained in:
Jaroslaw Konik 2023-07-14 21:46:29 +02:00
parent a94225c42a
commit 66ac36f945

View file

@ -344,25 +344,19 @@ require("scrollbar").setup()
-- Status line
require("lualine").setup()
-- OSC52 copy
-- OSC52 copy/paste
local function copy(lines, _)
require("osc52").copy(table.concat(lines, "\n"))
end
local function paste()
return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") }
end
vim.g.clipboard = {
name = "osc52",
copy = { ["+"] = copy, ["*"] = copy },
paste = { ["+"] = paste, ["*"] = paste },
}
-- Now the '+' register will copy to system clipboard using OSC52
vim.keymap.set("n", "<leader>c", '"+y')
vim.keymap.set("n", "<leader>cc", '"+yy')
-- Language Syntax
require("nvim-treesitter.configs").setup({
ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },