create neovim rc file: %USERPROFILE%\AppData\Local\nvim\init.lua
this script enables NeoVim yank synced with either windows or wsl (windows subsystem for linux) clipboard.
vim.opt.clipboard = "unnamedplus" | |
if vim.fn.has("wsl") == 1 then | |
vim.g.clipboard = { | |
name = "win32yank-wsl", | |
copy = { | |
["+"] = "win32yank.exe -i --crlf", | |
["*"] = "win32yank.exe -i --crlf", | |
}, | |
paste = { | |
["+"] = "win32yank.exe -o --lf", | |
["*"] = "win32yank.exe -o --lf", | |
}, | |
cache_enabled = 0, | |
} | |
end |