Merge pull request #1790 from xeluxee/fix-c-j-c-k-keybindings

fix(cmp): fix <C-j> and <C-k> keybindings not working
This commit is contained in:
Chase Colman 2021-10-17 14:37:32 +08:00 committed by GitHub
commit ee90075ef6
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -204,6 +204,8 @@ M.config = function()
{ name = "crates" },
},
mapping = {
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
-- TODO: potentially fix emmet nonsense

View file

@ -81,10 +81,6 @@ function M.config()
["<A-Down>"] = "<C-\\><C-N><C-w>j",
["<A-Left>"] = "<C-\\><C-N><C-w>h",
["<A-Right>"] = "<C-\\><C-N><C-w>l",
-- navigate tab completion with <c-j> and <c-k>
-- runs conditionally
["<C-j>"] = { 'pumvisible() ? "\\<down>" : "\\<C-j>"', { expr = true, noremap = true } },
["<C-k>"] = { 'pumvisible() ? "\\<up>" : "\\<C-k>"', { expr = true, noremap = true } },
},
---@usage change or add keymappings for normal mode