1
0
Fork 0
dotfiles/home/config/nvim/nifoc/clipboard.fnl

19 lines
658 B
Text
Raw Normal View History

2023-11-16 23:12:19 +00:00
(let [mod {}
osc52 (require :vim.ui.clipboard.osc52)
uname (vim.loop.os_uname)
clip-name :nifocClipboard]
(fn mod.setup []
(if (= uname.sysname :Darwin)
(set vim.g.clipboard {:name clip-name
2023-11-18 12:45:55 +00:00
:copy {:+ :pbcopy :* :pbcopy}
2023-11-16 23:12:19 +00:00
:paste {:+ :pbpaste :* :pbpaste}
:cache_enabled 0})
;; Other OS
(set vim.g.clipboard
{:name clip-name
2024-02-16 12:17:56 +00:00
:copy {:+ (osc52.copy "+") :* (osc52.copy "*")}
:paste {:+ (osc52.paste "+") :* (osc52.paste "*")}}))
2023-11-16 23:12:19 +00:00
(vim.opt.clipboard:prepend :unnamedplus))
mod)