nvim: OS-aware clipboard settings
This commit is contained in:
parent
cb1f090b97
commit
4fc1ed07f3
1 changed files with 9 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
(let [o vim.opt
|
(let [o vim.opt
|
||||||
g vim.g]
|
g vim.g
|
||||||
|
uname (vim.loop.os_uname)]
|
||||||
;; Preamble
|
;; Preamble
|
||||||
(vim.cmd.filetype "plugin indent on")
|
(vim.cmd.filetype "plugin indent on")
|
||||||
(set o.shell :/bin/sh)
|
(set o.shell :/bin/sh)
|
||||||
|
@ -60,11 +61,13 @@
|
||||||
(set o.undofile true)
|
(set o.undofile true)
|
||||||
(set o.undodir (.. (os.getenv :HOME) :/.local/share/nvim/undo//))
|
(set o.undodir (.. (os.getenv :HOME) :/.local/share/nvim/undo//))
|
||||||
;; Clipboard
|
;; Clipboard
|
||||||
|
(if (= uname.sysname :Darwin)
|
||||||
|
(do
|
||||||
(set g.clipboard {:name :pbcopy
|
(set g.clipboard {:name :pbcopy
|
||||||
:copy {:+ :pbcopy :* :pbcopy}
|
:copy {:+ :pbcopy :* :pbcopy}
|
||||||
:paste {:+ :pbpaste :* :pbpaste}
|
:paste {:+ :pbpaste :* :pbpaste}
|
||||||
:cache_enabled 0})
|
:cache_enabled 0})
|
||||||
(o.clipboard:prepend :unnamedplus)
|
(o.clipboard:prepend :unnamedplus)))
|
||||||
;; Theme
|
;; Theme
|
||||||
(let [theme (require :nifoc.theme)]
|
(let [theme (require :nifoc.theme)]
|
||||||
(theme.setup))
|
(theme.setup))
|
||||||
|
|
Loading…
Reference in a new issue