diff options
author | Yigit Sever | 2024-08-30 09:58:31 +0200 |
---|---|---|
committer | Yigit Sever | 2024-08-30 09:58:31 +0200 |
commit | f4834c7ff800aa06018997c5687c6ea507b63fe0 (patch) | |
tree | 8cd93725b7b4c95595d4d11786bdeda613f556f3 /.config/nvim/lua | |
parent | ec1864f403819346bd4445783959e4be083b0a61 (diff) | |
download | dotfiles-f4834c7ff800aa06018997c5687c6ea507b63fe0.tar.gz dotfiles-f4834c7ff800aa06018997c5687c6ea507b63fe0.tar.bz2 dotfiles-f4834c7ff800aa06018997c5687c6ea507b63fe0.zip |
nvim: update cutlass config (wayland)
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/plugins/cutlass.lua | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/.config/nvim/lua/plugins/cutlass.lua b/.config/nvim/lua/plugins/cutlass.lua index 521c906..c3cabe4 100644 --- a/.config/nvim/lua/plugins/cutlass.lua +++ b/.config/nvim/lua/plugins/cutlass.lua | |||
@@ -32,7 +32,24 @@ return { | |||
32 | { | 32 | { |
33 | "gbprod/yanky.nvim", | 33 | "gbprod/yanky.nvim", |
34 | config = function() | 34 | config = function() |
35 | if vim.fn.executable('xsel') == 1 then | 35 | if os.getenv("WAYLAND_DISPLAY") then |
36 | vim.g.clipboard = { | ||
37 | name = "wl-clipboard", | ||
38 | copy = { | ||
39 | ["+"] = 'wl-copy --foreground --type text/plain', | ||
40 | ["*"] = 'wl-copy --foreground --primary --type text/plain', | ||
41 | }, | ||
42 | paste = { | ||
43 | ["+"] = (function() | ||
44 | return vim.fn.systemlist('wl-paste --no-newline', { '' }, 1) -- '1' keeps empty lines | ||
45 | end), | ||
46 | ["*"] = (function() | ||
47 | return vim.fn.systemlist('wl-paste --primary --no-newline', { '' }, 1) | ||
48 | end), | ||
49 | }, | ||
50 | cache_enabled = true | ||
51 | } | ||
52 | else | ||
36 | -- fix Target STRING not available | 53 | -- fix Target STRING not available |
37 | -- if we are using xsel (X11) | 54 | -- if we are using xsel (X11) |
38 | vim.g.clipboard = { | 55 | vim.g.clipboard = { |