Closed jefftrull closed 3 years ago
Seems like it is something specific to your environment - it works fine on my side. Can you try with a new hello world project placed in /tmp/demo
and if does not work can you enable the client server logging by setting lsp-print-io to t and then attach the logs?
It may be that I just don't understand how it's meant to be used :) But I will try, yes.
OK I've created a small demonstration project. I launch Emacs using emacs -q --load startup.el test.cpp
, then run M-x lsp-treemacs-errors-list
, which reveals an empty horizontal window at the bottom of the screen.
Inserting an error into the source code results in a single line with a small icon and the text demo 3 /tmp
. Pressing "?" in that buffer produces the message The helpful hydra cannot be summoned without an existing treemacs buffer
. Pressing return launches a dired buffer with point on the build directory. No error messages or context information are shown.
Hm, did you try to press tab in that window with first item selected?
Ah... that's much better. I had no idea what to type in the window (and as I mentioned "?" produces an error message).
Could this be a usability/documentation bug? Or is "learn about treemacs first" a requirement?
We may keep it open - I am gradually rewriting controls to make them more user friendly. You may compare it with the symbols view.
I tried the symbols view first - it looked great! Thanks for making this (and for lsp-mode, generally - it's a game changer for me).
Hi,
I have a similar problem/suggestion as reported by @jefftrull - my errors list always starts with the tree collapsed. Ideally I'd like it to always be expanded but I cannot see any configuration options for this. Every time I change buffers the list collapses again, which makes it difficult to use.
In addition, when I press x
for quickfix, I get:
lsp--position-to-point: Wrong type argument: hash-table-p, :start
The debugger says:
Debugger entered--Lisp error: (wrong-type-argument hash-table-p :start)
gethash("line" :start)
lsp--position-to-point(:start)
lsp-treemacs-quick-fix()
funcall-interactively(lsp-treemacs-quick-fix)
#<subr call-interactively>(lsp-treemacs-quick-fix nil nil)
apply(#<subr call-interactively> lsp-treemacs-quick-fix (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> lsp-treemacs-quick-fix nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (lsp-treemacs-quick-fix nil nil))
call-interactively(lsp-treemacs-quick-fix nil nil)
command-execute(lsp-treemacs-quick-fix)
I'm using clangd 11, and I've just updated LSP mode:
lsp-mode 20200710.718 dependency LSP mode
Thanks very much for LSP.
@mcraveiro it is a regression introduced with lsp-protocol.el migration, I will provide a fix later today.
thanks very much @yyoncho.
Hi, I have the same problem as describer by the OP, here's a screenshot of my lsp-ui-flycheck-list working as expected
And here's a screenshot of my lsp-treemacs-errors-list
Log is on the right but as you can see there's isnt much except a lot of Cancelling textDocument/onTypeFormatting, which I don't think is relevant.
@mcraveiro it is a regression introduced with lsp-protocol.el migration, I will provide a fix later today.
@mcraveiro with a bit of delay, the fix is in.
Thanks very much for your hard work @yyoncho - I can confirm the quick fix works well with latest packages. Quick question though, is there a setting to always have the list expanded? Its a bit painful to have to go to the error buffer, then expand the list. Or is there a better workflow for this maybe? Cheers
@yyoncho First of all, thank you for the hard work. I am very happy to have discovered lsp-mode and lsp-treemacs and taken some time to set them up.
Hm, did you try to press tab in that window with first item selected?
I was expecting that doubleclick in GUI, and enter or spacebar in terminal UI, would expand the diagnostics folder tree. Note that Treemacs itself supports doubleclick on folders; maybe that's the right way out?
Tab can be a fine choice, but perhaps the README of lsp-treemacs
should mention it? Tab is a very unexpected choice for a newcomer to lsp-mode (and treemacs); even in Emacs UIs such as the customize UI, it seems to be switching between widgets rather than expanding folders.
Having run into this bug, I see Treemacs' README does mention TAB and RET as 'particularly customizable' and talks about 'closing/opening nodes' as opposed to 'visiting nodes'.
Ideally I'd like it to always be expanded
As @mcraveiro said, this would be ideal for my use as well; the errors list seems to wonderfully live update.
@ivucica lsp-treemacs-errors-list will be rewritten(due to being too slow) and the mouse interface will be like the one for lsp-treemacs-symbols. See https://github.com/emacs-lsp/lsp-mode/issues/2178 .
Should be fixed by lsp-treemacs-errors-list rewrite.
I gave it a try and it looks much better! I'm looking forward to familiarizing myself with the features.
The screenshot of Java errors looks great; I'd love to see the same thing for my C++ code but the "LSP Errors View" window never shows anything - it is empty, regardless of how many errors I inject into source code. flymake displays them... treemacs does not.
I could not find any documentation explaining how to configure this, but I did run
(lsp-treemacs-sync-mode 1)
beforelsp-treemacs-errors-list