GiorgosXou / init.lua

init.lua | Providing you with the capabilities of NVIM throught the familiarity of VSCode's keybindings.
28 stars 1 forks source link

idea: alt + click : goto definition #2

Open airtonix opened 1 year ago

airtonix commented 1 year ago

a way to jump to definition, like we can in vscode

GiorgosXou commented 1 year ago

try adding those 2 lines under the polish() function:

map.set('i', '<C-LeftMouse>', vim.lsp.buf.definition, bufopts)
map.set('n', '<C-LeftMouse>', vim.lsp.buf.definition, bufopts)

or

map.set('i', '<C-LeftMouse>', 'gd', bufopts)
map.set('n', '<C-LeftMouse>', 'gd', bufopts)

One of those 2 sets of 2 lines should work.

GiorgosXou commented 1 year ago

There's also F12

airtonix commented 1 year ago

will try this out 👍🏻