Skip to content
This repository was archived by the owner on Aug 11, 2024. It is now read-only.

Allow to jump to definition in lsp finder #102

Open
Suya1671 opened this issue Apr 22, 2022 · 6 comments
Open

Allow to jump to definition in lsp finder #102

Suya1671 opened this issue Apr 22, 2022 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Suya1671
Copy link

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?

@Suya1671 Suya1671 added the enhancement New feature or request label Apr 22, 2022
@kkharji
Copy link
Owner

kkharji commented Apr 22, 2022

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

@kkharji kkharji added the good first issue Good for newcomers label Apr 22, 2022
@raphaelcastaneda
Copy link

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
    }
})

@Suya1671
Copy link
Author

Thanks. I forgor to close

@raphaelcastaneda
Copy link

raphaelcastaneda commented May 3, 2022

@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.

#107

@Suya1671
Copy link
Author

Suya1671 commented May 4, 2022

@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.

#107

I'll check it out this afternoon

@kkharji kkharji reopened this May 4, 2022
@atticus-sullivan
Copy link

@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 #107 (comment) the file you open, opens in a new tab if I see this right. How did you configure this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants