mickesp · 2022-05-24 07:37
I use `lsp-mode` and `helm`. When listing all references to a symbol using `lsp-mode` I get a list in a `helm` window. I can navigate this list and select a specific reference to investigate. Upon selection, the `helm` window will close. If I activate `follow-mode` in the `helm` result list, I can navigate all listed references and keep the `helm` result list open. But I cannot temporarily switch from the `helm` result list to the buffer with the reference to navigate up and down to get more context for the reference, and then come back to the `helm` result list to continue investigating the rest of the references. The `helm` result window always closes when I switch out from the `helm` result buffer. I can recreate the `helm` session by doing `C-x c b` and continue investigating all the other references. Is there a way to pin the `helm` result window and keep it open when I switch to a specific reference in the result list?
Ok-Promise-500 · 2022-05-24 11:06
Have you tried `helm-resume`?
helm05 · 2022-05-24 11:41
You do not have to switch to the other buffer, use instead C-M-<down/up> to see more context.
mickesp · 2022-05-24 13:45
Yes, I have tried `helm-resume` through `C-x c b`. It's a decent workaround, but my wish is to keep the helm window open while I navigate the other buffer. With helm-resume I recreate the helm session after navigating. It's ok but not exactly what I'm after.
yyoncho · 2022-05-24 18:43
That is again not quite the same but you may use lsp-treemacs-references which will be pinned and help-swoop in the treemacs buffer or other narrowing strategy. As a bonus, you may use `link-hint` package (my personal favourite) to jump to a particular reference in treemacs window.
helm05 · 2022-05-25 04:41
Please stop recommending helm-swoop which is a deprecated package no more maintained, use helm-occur instead.
As I said in previous post user have just to scroll other window to see more context.
mickesp · 2022-05-25 07:39
Actually, lsp-treemacs-references is precisely what I'm looking for. Is it possible for me to add this to lsp-modes key bindings?
yyoncho · 2022-05-25 07:46
Yes. There is nothing special. Use `define-key` + `lsp-mode-map`.
Ghosty141 · 2022-05-27 12:46
Embark has embark-export that does that. Not sure how well it works with helm. I use it when searching for something with consult-ripgrep to then "persist" the search results