diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-05-04 21:48:49 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-05-04 21:49:51 +0200 |
commit | 4bc050f3e2b4220404db18a8878c1a2f1a598d66 (patch) | |
tree | 7e1cf2fdb7b3a82d972d53d8d7993710f5823c1d /modules/by-name/nv/nvim/mappings/default.nix | |
parent | modules/nvim/options/completeopt: Move to `plgs/nvim-cmp` (diff) | |
download | nixos-config-4bc050f3e2b4220404db18a8878c1a2f1a598d66.zip |
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.
Diffstat (limited to 'modules/by-name/nv/nvim/mappings/default.nix')
-rw-r--r-- | modules/by-name/nv/nvim/mappings/default.nix | 28 |
1 files changed, 0 insertions, 28 deletions
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 = "<cmd>noh<CR><Esc>"; 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 = "<C-Tab>"; |