emacs-lsp / lsp-metals

lsp-mode :heart: metals
https://emacs-lsp.github.io/lsp-metals
GNU General Public License v3.0
58 stars 34 forks source link

add command to reset settings choices #18

Closed kpbochenek closed 3 years ago

kpbochenek commented 3 years ago

Right now everytime you change build.sbt you get prompted to import build or not import anymore. If you decide not to import anymore you cannot go back from your decision and you have to wipe .metals directory.

With (https://github.com/scalameta/metals/pull/1897) you can execute command metals.reset-choice that would allow you to reset decision to never import a build on change.

It should potentially be a matter of adding?

(defun lsp-metals-reset-choice)
  "Walk all files in the workspace and index where symbols are defined."
  (interactive)
  (lsp-send-execute-command "reset-choice" ()))

For details if you execute this command without any parameters it will prompt you what setting do you want to reset. But you can also explicitly say what you want to reset. Then you can call it with e.g. "build import". Having it work in interactive mode would be already awesome :+1:

EDIT: PR is merged