emacs-lsp / lsp-treemacs

lsp-mode :heart: treemacs
GNU General Public License v3.0
396 stars 46 forks source link

Apply all quick-fixes? #84

Closed indigoviolet closed 3 years ago

indigoviolet commented 3 years ago

lsp-treemacs-quick-fix is very nice. Would be even more convenient to apply all quick fixes from the code buffer without having to open the lsp-treemacs-errors-list and step through each error - is this possible?

Thank you!

yyoncho commented 3 years ago

Up to my knowledge, ATM there is no generic quick fix all function provided by the server. Some servers like eslint have ad-hoc quickfix all.

rileyrg commented 3 years ago

I've just seen the wonderful quickfix functionality in the treemacs error tree, super stuff. I think the OP was also referring to the ability to do quick fixes from within the code buffer without the need to use the treemacs view, which is hard to navigate to and from with keyboard, rather than only a "fix all in one go" solution. Regarding the quick fixes, if I see something like "switch if statement" in the Sideline this isnt actually an error and so wont appear in the treemacs error view : however, if I artificially create a real error in my code I can hop to the treemacs view and a quick fix option to switch the if statement is there in addition to the new error which populated the treemacs error window! And it works. Really cool. But would be cooler to be able to do it from the code buffer.

yyoncho commented 3 years ago

But would be cooler to be able to do it from the code buffer.

M-x lsp-execute-code-action?

rileyrg commented 3 years ago

Aargh. I'm just replumbing my set-up to greatly simplify it in light of the new advances in lsp. And I missed that. Excellent. Thank you.