From 8cb239963ae0fd8a9ea75a377bfa644a8ee98b20 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Thu, 31 Jul 2025 14:17:38 +0200 Subject: [PATCH] Configure nvim to use system clipboard by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add clipboard = "unnamedplus" to make all yank operations use system clipboard - Remove redundant y keymapping since y now copies to clipboard by default - Preserve full access to vim's register system (named registers still work independently) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- modules/nvim.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/nvim.nix b/modules/nvim.nix index 9d5aea1..31ee7aa 100644 --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -21,6 +21,7 @@ breakindent = true; # Preserve indentation when wrapping termguicolors = true; autoread = true; # Automatically reload files when changed externally + clipboard = "unnamedplus"; # Use system clipboard by default }; # Enable filetype detection @@ -142,12 +143,6 @@ } # System clipboard keymaps - { - mode = ["n" "v"]; - key = "y"; - action = "\"+y"; - options = { desc = "Copy to system clipboard"; }; - } { mode = "n"; key = "p";