Skip to content

Commit a755e4c

Browse files
Merge pull request #11 from venkatarenduchintala/fix/wl-clipboard-paste
Fix/wl clipboard paste yanking text hangs neovim
2 parents 4b50880 + b3e6eab commit a755e4c

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

lua/settings.lua

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
local utils = require("utils")
22

3+
if vim.fn.has("unix") == 1 and vim.fn.executable("wl-copy") == 1 and vim.env.WAYLAND_DISPLAY then
4+
vim.g.clipboard = {
5+
name = "wl-clipboard",
6+
copy = {
7+
["+"] = { "wl-copy", "--type", "text/plain" },
8+
["*"] = { "wl-copy", "--primary", "--type", "text/plain" },
9+
},
10+
paste = {
11+
["+"] = { "wl-paste", "--no-newline" },
12+
["*"] = { "wl-paste", "--no-newline", "--primary" },
13+
},
14+
cache_enabled = 0,
15+
}
16+
end
17+
318
local options = {
419
autoindent = true,
520
autoread = true,
621
background = "dark",
722
backup = false,
823
breakindent = true, -- Enable break indent
9-
clipboard = "unnamed,unnamedplus", -- Use system clipboard
24+
clipboard = "unnamedplus", -- Use system clipboard
1025
cmdheight = 1,
1126
completeopt = "noinsert,menuone,noselect", -- Set completeopt to have a better completion experience
1227
confirm = true,

0 commit comments

Comments
 (0)