diff options
author | Silas Schöffel <sils@sils.li> | 2024-04-04 14:10:05 +0200 |
---|---|---|
committer | Silas Schöffel <sils@sils.li> | 2024-04-04 14:10:05 +0200 |
commit | ea4b9f722553a6000fad30848614077646067d97 (patch) | |
tree | 1a2a0ea8da9b3066bd860f0bafeaa624781df1b4 | |
parent | nixvim: enable nvim-cmp (diff) | |
download | nix-config-ea4b9f722553a6000fad30848614077646067d97.tar.gz nix-config-ea4b9f722553a6000fad30848614077646067d97.zip |
nixvim: add cmp mappings
Diffstat (limited to '')
-rw-r--r-- | users/sils/nixvim/config.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/users/sils/nixvim/config.nix b/users/sils/nixvim/config.nix index 1cf67c5..c22ca5b 100644 --- a/users/sils/nixvim/config.nix +++ b/users/sils/nixvim/config.nix @@ -58,6 +58,15 @@ pkgs: { cmp = { enable = true; settings = { + mappings = { + "<C-Space>" = "cmp.mapping.complete()"; + "<C-d>" = "cmp.mapping.scroll_docs(-4)"; + "<C-e>" = "cmp.mapping.close()"; + "<C-f>" = "cmp.mapping.scroll_docs(4)"; + "<CR>" = "cmp.mapping.confirm({ select = true })"; + "<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; preselect = "None"; sources = [ {name = "nvim_lsp";} |