Skip to content

How to get back after gd (goto definition)? #373

Closed Answered by VonHeikemen
DrakorissVere asked this question in Q&A
Discussion options

You must be logged in to vote

Ctrl + t should take you back to the position where you called gd.

You can add a custom keybinding to nvim-cmp (the autocompletion plugin) to navigate between snippet placeholders.

Here is an example.

local cmp = require('cmp')
local cmp_action = require('lsp-zero').cmp_action()

cmp.setup({
 mapping = cmp.mapping.preset.insert({
   ['<C-f>'] = cmp_action.luasnip_jump_forward(),
   ['<C-b>'] = cmp_action.luasnip_jump_backward(),
 })
})

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by DrakorissVere
Comment options

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