diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-03-10 16:56:01 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-03-10 16:56:01 +0800 |
commit | 9e635213f5a5145db7b31972050ab75f1aa19c15 (patch) | |
tree | 41679a8b50dd33e4cece5ad1b718a93e8026b1ec /store/home/config/nvim/lua/crupest | |
parent | 3c8127fe2a955dae09c8ff4a0626a748b6e79461 (diff) | |
download | crupest-9e635213f5a5145db7b31972050ab75f1aa19c15.tar.gz crupest-9e635213f5a5145db7b31972050ab75f1aa19c15.tar.bz2 crupest-9e635213f5a5145db7b31972050ab75f1aa19c15.zip |
feat(nvim): add more tools.
Diffstat (limited to 'store/home/config/nvim/lua/crupest')
-rw-r--r-- | store/home/config/nvim/lua/crupest/nvim/plugins/cmp.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/store/home/config/nvim/lua/crupest/nvim/plugins/cmp.lua b/store/home/config/nvim/lua/crupest/nvim/plugins/cmp.lua index 9b1d876..2244443 100644 --- a/store/home/config/nvim/lua/crupest/nvim/plugins/cmp.lua +++ b/store/home/config/nvim/lua/crupest/nvim/plugins/cmp.lua @@ -9,13 +9,16 @@ local function setup() end, }, window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), }, mapping = cmp.mapping.preset.insert({ ['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-f>'] = cmp.mapping.scroll_docs(4), - ['<C-Space>'] = cmp.mapping.complete(), - ['<C-e>'] = cmp.mapping.abort(), - ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + ['<C-j>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), + ['<C-k>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), + ['<C-y>'] = cmp.mapping.confirm({ select = true }), + ['<CR>'] = cmp.mapping.confirm({ select = true }), }), sources = cmp.config.sources({ { name = 'nvim_lsp' }, |