diff options
author | Silas Schöffel <sils@sils.li> | 2024-04-07 20:52:56 +0200 |
---|---|---|
committer | Silas Schöffel <sils@sils.li> | 2024-04-07 20:52:56 +0200 |
commit | 59974f833a3e3b706ba035e65b810d71e26ef40b (patch) | |
tree | e93532f92675dbde8c48e8ce43845fa9e792574c | |
parent | nixvim: disable highlighting when pressing <Esc> (diff) | |
download | nix-config-59974f833a3e3b706ba035e65b810d71e26ef40b.tar.gz nix-config-59974f833a3e3b706ba035e65b810d71e26ef40b.zip |
nixvim: add completion keymap
Diffstat (limited to '')
-rw-r--r-- | hm/nixvim/config.nix | 15 |
1 files changed, 15 insertions, 0 deletions
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 = "<Esc>"; action = "<cmd>noh<CR><Esc>"; } + { + mode = ["i"]; + key = "<A-Space>"; + 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 |