diff --git a/init.lua b/init.lua index 1063842..13dd3c1 100644 --- a/init.lua +++ b/init.lua @@ -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", "c", '"+y') -vim.keymap.set("n", "cc", '"+yy') - -- Language Syntax require("nvim-treesitter.configs").setup({ ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },