From ed932da1f693365a275f188388a39e610fdfaf00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Sat, 27 Jul 2024 16:20:58 +0200 Subject: [PATCH] nixvim(cmp): configure keymaps the way i like them --- flake.lock | 2 +- nixvim/config/cmp.nix | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 5ebe5e6..fa397fd 100644 --- a/flake.lock +++ b/flake.lock @@ -315,7 +315,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-1L5aXNQndyNRWsIE5GzvmHNKT7UWX4BRSPitnvuUdp0=", + "narHash": "sha256-qIze//rcbqR1WxlONQNikWyyizNP1XzVATZOP2lJjIc=", "path": "./nixvim", "type": "path" }, diff --git a/nixvim/config/cmp.nix b/nixvim/config/cmp.nix index b021346..a2fd9c4 100644 --- a/nixvim/config/cmp.nix +++ b/nixvim/config/cmp.nix @@ -8,6 +8,12 @@ { name = "path"; } { name = "buffer"; } ]; + + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_next_item({'i', 's'}))"; + "" = "cmp.mapping(cmp.mapping.select_prev_item({'i', 's'}))"; + }; }; }; }