From 4bc050f3e2b4220404db18a8878c1a2f1a598d66 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 4 May 2025 21:48:49 +0200 Subject: modules/nvim/plgs/nvim-cmp: Unify key mappings by moving to the global module This makes it possible, to use the `options.desc` field to add a which-key description. I also used this chance to unify the `cmp` related key mappings in one file. --- modules/by-name/nv/nvim/mappings/default.nix | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'modules/by-name/nv/nvim/mappings/default.nix') diff --git a/modules/by-name/nv/nvim/mappings/default.nix b/modules/by-name/nv/nvim/mappings/default.nix index 2e14cc80..4997f66c 100644 --- a/modules/by-name/nv/nvim/mappings/default.nix +++ b/modules/by-name/nv/nvim/mappings/default.nix @@ -27,34 +27,6 @@ in { action = "noh"; options.desc = "Disable the search highlighting and send Escape"; } - { - key = "hh"; - mode = ["i"]; - action.__raw = '' - function() - local cmp = require('cmp'); - local luasnip = require('luasnip'); - - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - end - end - ''; - options.desc = "completion trigger/ forward in completen menu"; - } - { - key = "uu"; - mode = ["i"]; - action.__raw = '' - function() - local cmp = require('cmp'); - cmp.confirm() - end - ''; - options.desc = "confirm the selected item"; - } { key = ""; -- cgit 1.4.1