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

19 lines
658 B
Text
Raw Normal View History

2023-11-17 00:12:19 +01: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 13:45:55 +01:00
:copy {:+ :pbcopy :* :pbcopy}
2023-11-17 00:12:19 +01:00
:paste {:+ :pbpaste :* :pbpaste}
:cache_enabled 0})
;; Other OS
(set vim.g.clipboard
{:name clip-name
2024-02-16 13:17:56 +01:00
:copy {:+ (osc52.copy "+") :* (osc52.copy "*")}
:paste {:+ (osc52.paste "+") :* (osc52.paste "*")}}))
2023-11-17 00:12:19 +01:00
(vim.opt.clipboard:prepend :unnamedplus))
mod)