emacs-lsp / lsp-metals

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

Fully switch to configuration via initializationOptions #25

Closed ckipp01 closed 3 years ago

ckipp01 commented 4 years ago

As of 0.9.2 of Metals it's now fully possible to use Metals without needing to set the client property when bootstrapping Metals. Ultimately the hope is that this will provide a smoother experience for users since they are able to just install Metals, and then let the client take care of setting the correct initializationOptions. We are going to update the docs soon to recommend installing Metals via cs install metals rather than using bootstrap (https://github.com/scalameta/metals/issues/1884). For the time being there is a metals-emacs app in coursier/apps, but there will also soon be a plain metals (https://github.com/coursier/apps/pull/59). Once this happens, you would be able to update the initializationOptions and the lsp-metals-server-command and you should be able to use it. Looking at the server, the only things the client=emacs changes is the following:

executeClientCommandProvider set to true (which you already have), and compilerInitializationOptions.snippetAutoIndent set to false (if that still applies). So in theory you should just have to add that last setting and you should be good to go.

You can read more about the configuration changes here on the site.

kurnevsky commented 3 years ago

I think compilerInitializationOptions.snippetAutoIndent doesn't apply anymore - I tested it for docs completion and it worked fine for me with this option either enabled or disabled.