Closed ericdallo closed 4 years ago
Thanks @danielmartin, I understand and I really hope we find a solution because I want to replace my lsp-find-references
with lsp-treemacs-refereneces
because treemacs has a better UX.
@ericdallo willing to implement the following behavior?
M-x lsp-treemacs-references - switches to the window. C-u M-x lsp-treemacs-references - show the window but it does not switch to it.
@danielmartin
I've never found any server slow enough for this to be noticeable.
JDT LS could take 20+ seconds. I think that ccls/clangd have everything precalculated and they just return the result.
@yyoncho, Can I use the prefix-argument
that currently is used for expand
the references?
https://github.com/emacs-lsp/lsp-treemacs/pull/33/files#diff-f7b652b3dbdcf99d9b44702b250a77e7R1199-R1201
If not, can you give some suggestions on how I can achieve that? Checking if the expand?
prefix-argument
is (4)
? PrefixArgument
@yyoncho, Can I use the prefix-argument that currently is used for expand the references?
Ah, I totally forgot about that, sorry:
Can we then make it like that:
C-0 M-x lsp-treemacs-references - async call(this is equivalent to prefix = 0). C-u M-x lsp-treemacs-references - select buffer and expand M-x lsp-treemacs-references - select buffer and no expand
Done @yyoncho
M-x
lsp-treemacs-references
- nil
- select, no expands.C-u M-x
lsp-treemacs-references
- '(4)
- select and expands.C-0 M-x
lsp-treemacs-references
- 0
- no select, no expands.Done @yyoncho, thanks!
Thank you for contributing to lsp-treemacs
! I merged the PR. In addition, I did some small adjustments (one of them was to revert my advice to use zerop because (zerop nil)
throws).
Currently when you use
lsp-treemacs-errors-list
, automatically jumps to the new buffer showing the errors, butlsp-treemacs-references
don't do that.This PR fixes
lsp-treemacs-references
andlsp-treemacs-implementations
to jump likelsp-treemacs-errors-list