fix(nvim): wsl clipboard
This commit is contained in:
parent
c8b09f19d7
commit
3d74562317
1 changed files with 25 additions and 0 deletions
|
@ -55,3 +55,28 @@ if vim.fn.has("nvim-0.10") == 1 then
|
|||
end
|
||||
|
||||
o.conceallevel = 2
|
||||
|
||||
-- Use the right clipboard when on WSL
|
||||
local function is_wsl()
|
||||
local wsl_check = os.getenv("WSL_DISTRO_NAME") ~= nil
|
||||
return wsl_check
|
||||
end
|
||||
|
||||
-- Install win32yank with cargo and then run:
|
||||
-- sudo ln -s /mnt/c/Users/jared/.cargo/bin/win32yank.exe /usr/local/bin/win32yank
|
||||
if is_wsl() then
|
||||
go.clipboard = {
|
||||
|
||||
name = "win32yank-wsl",
|
||||
copy = {
|
||||
["+"] = "win32yank.exe -i --crlf",
|
||||
["*"] = "win32yank.exe -i --crlf",
|
||||
},
|
||||
|
||||
paste = {
|
||||
["+"] = "win32yank.exe -o --lf",
|
||||
["*"] = "win32yank.exe -o --lf",
|
||||
},
|
||||
cache_enabled = 1,
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue