From 59974f833a3e3b706ba035e65b810d71e26ef40b Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Sun, 7 Apr 2024 20:52:56 +0200 Subject: nixvim: add completion keymap --- hm/nixvim/config.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'hm') diff --git a/hm/nixvim/config.nix b/hm/nixvim/config.nix index 99d003f..51ff108 100644 --- a/hm/nixvim/config.nix +++ b/hm/nixvim/config.nix @@ -55,6 +55,21 @@ pkgs: { key = ""; action = "noh"; } + { + mode = ["i"]; + key = ""; + action = '' + function() + local cmp = require('cmp'); + local luasnip = require('luasnip'); + + if cmp.visible() then + cmp.select_next_item() + end + end + ''; + lua = true; + } ]; extraPlugins = with pkgs.vimPlugins; [ vim-airline-themes -- cgit 1.4.1