From 0217c618a62a65c8ff5cdf25d1d64542dfcb6b83 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Fri, 16 Feb 2024 13:17:56 +0100 Subject: [PATCH] nvim: clipboard --- home/config/nvim/nifoc/clipboard.fnl | 4 ++-- home/config/nvim/plugins/yanky.fnl | 6 ++++-- home/programs/nvim/default.nix | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/home/config/nvim/nifoc/clipboard.fnl b/home/config/nvim/nifoc/clipboard.fnl index 5697722..b7bb654 100644 --- a/home/config/nvim/nifoc/clipboard.fnl +++ b/home/config/nvim/nifoc/clipboard.fnl @@ -11,8 +11,8 @@ ;; Other OS (set vim.g.clipboard {:name clip-name - :copy {:+ osc52.copy :* osc52.copy} - :paste {:+ osc52.paste :* osc52.paste}})) + :copy {:+ (osc52.copy "+") :* (osc52.copy "*")} + :paste {:+ (osc52.paste "+") :* (osc52.paste "*")}})) (vim.opt.clipboard:prepend :unnamedplus)) mod) diff --git a/home/config/nvim/plugins/yanky.fnl b/home/config/nvim/plugins/yanky.fnl index 9f0b2cc..4093a16 100644 --- a/home/config/nvim/plugins/yanky.fnl +++ b/home/config/nvim/plugins/yanky.fnl @@ -1,2 +1,4 @@ -(let [yanky (require :yanky)] - (yanky.setup {:ring {:storage :memory}})) +(let [yanky (require :yanky) + uname (vim.loop.os_uname)] + (yanky.setup {:ring {:storage :memory} + :system_clipboard {:sync_with_ring (= uname.sysname :Darwin)}})) diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 55224be..85fe371 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -18,6 +18,8 @@ in extraLuaPackages = luaPkgs: with luaPkgs; [ jsregexp lua-toml readline ]; extraPackages = with pkgs; [ + stdenv.cc + git nodejs tree-sitter