emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.04k stars 140 forks source link

Should rust analyzer assists appear in sideline by default? #455

Open jacg opened 4 years ago

jacg commented 4 years ago

Rust analyzer assists are not advertised in the sideline. Changing the value of lsp-ui-sideline-actions-kind-regex from the default "quickfix.*\\|refactor.*" to ".*" overcomes this. The question is, should these assists be displayed by default?

@yyoncho suggested that the behaviour of vscode be consulted as the oracle of wisdom on this point. Unfortunately, I am currently unable to run vscode with the required extension, in order to answer this question.

antifuchs commented 4 years ago

I think it's probably a thing RA is getting wrong: These assists should have a type Reported there at https://github.com/rust-analyzer/rust-analyzer/issues/5172. I've worked around this by using:

  (add-hook 'rust-mode-hook (defun asf--rust-allow-all-fixes ()
                              (setq-local lsp-ui-sideline-actions-kind-regex "quickfix.*\\|refactor.*\\|^$")))

That should set up the lsp-ui sideline to display all "" type code assists from rust-analyzer.

yyoncho commented 4 years ago

we have updated that regex in lsp-mode we should probably eliminate the lsp-ui variable and use the lsp-mode one.