lspsaga.nvim icon indicating copy to clipboard operation
lspsaga.nvim copied to clipboard

Allow to jump to definition in lsp finder

Open Suyashtnt opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe. I really dont want to have a seperate keybinding when jumping to the definition vs finding it

Describe the solution you'd like being able to press enter on a result or the result number to jump to it

Describe alternatives you've considered Create a seperate keybinding

Additional context Also how do you actually close the lsp finder window?

Suyashtnt avatar Apr 22 '22 13:04 Suyashtnt

Unfortunately, I don't use lsp_finder at all, if anyone is using it and want to extend it please open a pr.

kkharji avatar Apr 22 '22 18:04 kkharji

Opening a reference by result number would be a new feature I think but you can already configure the finder window's action keys like so:

local saga = require 'lspsaga'
saga.init_lsp_saga({
    finder_action_keys = {
        open = '<CR>', vsplit = 's', split = 'i', quit = { 'q', '<Esc>' }, scroll_down = '<C-f>', scroll_up = '<C-b>' -- quit can be a table
    }
})

raphaelcastaneda avatar Apr 27 '22 21:04 raphaelcastaneda

Thanks. I forgor to close

Suyashtnt avatar Apr 30 '22 07:04 Suyashtnt

@Suyashtnt I was interested in this too so I threw together a quick implementation. Try that out and lmk if that's what you had in mind. Numbers jump to the specified item in the menu, but I figured you might still want to see the preview window before going directly to the file, so you'd have to hit number + enter.

https://github.com/tami5/lspsaga.nvim/pull/107

raphaelcastaneda avatar May 03 '22 17:05 raphaelcastaneda

@Suyashtnt I was interested in this too so I threw together a quick implementation. Try that out and lmk if that's what you had in mind. Numbers jump to the specified item in the menu, but I figured you might still want to see the preview window before going directly to the file, so you'd have to hit number + enter.

https://github.com/tami5/lspsaga.nvim/pull/107

I'll check it out this afternoon

Suyashtnt avatar May 04 '22 06:05 Suyashtnt

@raphaelcastaneda Just one little question (hoping not getting blamed to post as a comment in this issue, I didn't wanted to create a new one, creating lots of question issues in the repo): In your video in https://github.com/tami5/lspsaga.nvim/pull/107#issuecomment-1116395033 the file you open, opens in a new tab if I see this right. How did you configure this?

atticus-sullivan avatar May 08 '22 10:05 atticus-sullivan