This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Yank to OS clipboard via OSC52 | |
---@enum (key) mode | |
local commands = { | |
block = "`[`]y", | |
char = "`[v`]y", | |
line = "`[V`]y", | |
} | |
---@param command string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if vim.api.orig == nil then | |
vim.api.orig = {} | |
for name, func in pairs(vim.api) do | |
vim.api.orig[name] = func | |
end | |
local default_win_config = { | |
border = "single", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local cmp_config | |
local function cmp_enable() | |
local ok, cmp = pcall(require, "cmp") | |
if ok then | |
cmp.setup({ enabled = cmp_config.enabled }) | |
end | |
end | |
local function cmp_disable() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function tbl_copy(t) | |
if type(t) ~= "table" then | |
return t | |
end | |
local res = {} | |
for k, v in pairs(t) do | |
res[k] = tbl_copy(v) | |
end | |