summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/cutlass.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/cutlass.lua')
-rw-r--r--.config/nvim/lua/plugins/cutlass.lua46
1 files changed, 33 insertions, 13 deletions
diff --git a/.config/nvim/lua/plugins/cutlass.lua b/.config/nvim/lua/plugins/cutlass.lua
index b9332a9..c3cabe4 100644
--- a/.config/nvim/lua/plugins/cutlass.lua
+++ b/.config/nvim/lua/plugins/cutlass.lua
@@ -32,19 +32,39 @@ return {
32 { 32 {
33 "gbprod/yanky.nvim", 33 "gbprod/yanky.nvim",
34 config = function() 34 config = function()
35 -- fix Target STRING not available 35 if os.getenv("WAYLAND_DISPLAY") then
36 vim.g.clipboard = { 36 vim.g.clipboard = {
37 name = 'xsel_override', 37 name = "wl-clipboard",
38 copy = { 38 copy = {
39 ['+'] = 'xsel --input --clipboard', 39 ["+"] = 'wl-copy --foreground --type text/plain',
40 ['*'] = 'xsel --input --primary', 40 ["*"] = 'wl-copy --foreground --primary --type text/plain',
41 }, 41 },
42 paste = { 42 paste = {
43 ['+'] = 'xsel --output --clipboard', 43 ["+"] = (function()
44 ['*'] = 'xsel --output --primary', 44 return vim.fn.systemlist('wl-paste --no-newline', { '' }, 1) -- '1' keeps empty lines
45 }, 45 end),
46 cache_enabled = 1, 46 ["*"] = (function()
47 } 47 return vim.fn.systemlist('wl-paste --primary --no-newline', { '' }, 1)
48 end),
49 },
50 cache_enabled = true
51 }
52 else
53 -- fix Target STRING not available
54 -- if we are using xsel (X11)
55 vim.g.clipboard = {
56 name = 'xsel_override',
57 copy = {
58 ['+'] = 'xsel --input --clipboard',
59 ['*'] = 'xsel --input --primary',
60 },
61 paste = {
62 ['+'] = 'xsel --output --clipboard',
63 ['*'] = 'xsel --output --primary',
64 },
65 cache_enabled = 1,
66 }
67 end
48 68
49 local map = require("helpers.keys").map 69 local map = require("helpers.keys").map
50 70