1
0
Fork 0

nvim: OS-aware clipboard settings

This commit is contained in:
Daniel Kempkens 2022-07-31 22:08:31 +02:00
parent cb1f090b97
commit 4fc1ed07f3

View file

@ -1,5 +1,6 @@
(let [o vim.opt
g vim.g]
g vim.g
uname (vim.loop.os_uname)]
;; Preamble
(vim.cmd.filetype "plugin indent on")
(set o.shell :/bin/sh)
@ -60,11 +61,13 @@
(set o.undofile true)
(set o.undodir (.. (os.getenv :HOME) :/.local/share/nvim/undo//))
;; Clipboard
(set g.clipboard {:name :pbcopy
:copy {:+ :pbcopy :* :pbcopy}
:paste {:+ :pbpaste :* :pbpaste}
:cache_enabled 0})
(o.clipboard:prepend :unnamedplus)
(if (= uname.sysname :Darwin)
(do
(set g.clipboard {:name :pbcopy
:copy {:+ :pbcopy :* :pbcopy}
:paste {:+ :pbpaste :* :pbpaste}
:cache_enabled 0})
(o.clipboard:prepend :unnamedplus)))
;; Theme
(let [theme (require :nifoc.theme)]
(theme.setup))