refactor neovim config
This commit is contained in:
parent
df34683aea
commit
fc8f483fa7
43 changed files with 346 additions and 102 deletions
31
nvim/lua/juancwu/config/clipboard.lua
Normal file
31
nvim/lua/juancwu/config/clipboard.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
local Utils = require("juancwu.utils")
|
||||
|
||||
if Utils.os.is_linux() then
|
||||
vim.g.clipboard = {
|
||||
name = "xclip",
|
||||
copy = {
|
||||
['+'] = "xclip -sel clip -i -quiet",
|
||||
['*'] = "xclip -sel primary -i -quiet",
|
||||
},
|
||||
paste = {
|
||||
['+'] = "xclip -sel clip -o -quiet",
|
||||
['*'] = "xclip -sel primary -o -quiet",
|
||||
},
|
||||
cache_enabled = 1,
|
||||
}
|
||||
elseif Utils.os.is_mac() then
|
||||
vim.opt.clipboard:append { "unnamedplus" }
|
||||
elseif Utils.os.is_wsl() then
|
||||
vim.g.clipboard = {
|
||||
name = "win32yank",
|
||||
copy = {
|
||||
['+'] = "win32yank.exe -i --crlf",
|
||||
['*'] = "win32yank.exe -i --crlf",
|
||||
},
|
||||
paste = {
|
||||
['+'] = "win32yank.exe -o --lf",
|
||||
['*'] = "win32yank.exe -o --lf",
|
||||
},
|
||||
cache_enabled = 0,
|
||||
}
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue