Skip to content

Conditional mapping #1571

Answered by nyngwang
nyngwang asked this question in Q&A
Discussion options

You must be logged in to vote

I'm noob, this can be done for sure:

          ['<C-o>'] = cmp.mapping {
            -- toggle completion menu.
            i = function ()
              if cmp.visible()
                then cmp.close()
                else cmp.complete() end
            end,
          },

credit: Our glorious master TJ sir's dotfiles.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nyngwang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant