irongit

created a table for clipboards to choose from

huncholanehuncholaneauthored
parent b89d52dcommit e8a13c422ce4daad45a0fb368666f074fed91946Browse files

1 file changed, +16 -6

+16-6nvim/lua/config/options.lua
@@ -8,11 +8,8 @@ vim.g.ai_cmp = false
88 -- disable swap files, not needed with autosession
99 vim.opt.swapfile = false
1010
11--- wayland settings
12-if vim.fn.getenv("WAYLAND_DISPLAY") ~= vim.NIL then
13- -- vim.notify("Wayland detected")
14-
15- vim.g.clipboard = {
11+local clipboards = {
12+ xclip = {
1613 name = "xclip",
1714 copy = {
1815 ["+"] = "xclip -selection clipboard",
@@ -23,7 +20,20 @@ if vim.fn.getenv("WAYLAND_DISPLAY") ~= vim.NIL then
2320 ["*"] = "xclip -selection primary -o",
2421 },
2522 cache_enabled = 1,
26- }
23+ },
24+ wayland = {
25+ name = "wl-clipboard",
26+ copy = { ["+"] = "wl-copy", ["*"] = "wl-copy" },
27+ paste = {
28+ ["+"] = "wl-paste --no-newline",
29+ ["*"] = "wl-paste --no-newline",
30+ },
31+ cache_enabled = 1,
32+ },
33+}
34+-- wayland settings
35+if vim.fn.getenv("WAYLAND_DISPLAY") ~= vim.NIL then
36+ vim.g.clipboard = clipboards.wayland
2737 end
2838
2939 -- disable animations