Skip to content

Commit

Permalink
Merge pull request #598 from Jint-lzxy/pref/cmp-keymap
Browse files Browse the repository at this point in the history
pref(cmp)!: update keymap for `cmp.close`
  • Loading branch information
ayamir authored Mar 26, 2023
2 parents 441321b + 109881e commit 4b1684a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dots.tutor
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The completion window will always show no matter what file you are editing.
You can use `<Tab>`{normal} and `<S-Tab>`{normal} to select next and previous candidate in
the completion window and use `<CR>`{normal} to confirm completion. You can also use
`<C-n>`{normal} and `<C-p>`{normal} and `<C-y>`{normal} to do it. Sometimes you don't want confirm
completion but just want to new a line, you can use `<C-e>`{normal} to close the
completion but just want to new a line, you can use `<C-w>`{normal} to close the
window manually.

There are more functions provided by lsp besides code completion.
Expand Down
2 changes: 1 addition & 1 deletion lua/modules/configs/completion/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ return function()
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-e>"] = cmp.mapping.close(),
["<C-w>"] = cmp.mapping.close(),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
Expand Down

0 comments on commit 4b1684a

Please sign in to comment.