Closed martijnhoekstra closed 6 years ago
There's currently no documentation on this, but your best bet is to use the vscode extension implementation as a reference.
Here it is: https://github.com/scalameta/metals/blob/master/vscode-extension/src/extension.ts#L17-L54
It's in TypeScript, but it should be pretty straightforward to follow.
Hope that helps.
@martijnhoekstra which editor/IDE are you targeting? For the sbt server there is a VSCode plugin in the sbt repo: https://github.com/sbt/sbt/tree/1.x/vscode-sbt-scala (there are also writeups about integrating it with Neovim and Sublime).
And for Metals, besides the VSCode plugin there is a launcher bash-script: https://github.com/scalameta/metals/blob/master/bin/start-server.sh (which is a bit outdated, I think)
It should be basically just running this command (assuming you have coursier around):
coursier launch \
--repository bintray:scalameta/maven \
org.scalameta:metals_2.12:$version \
--main scala.meta.metals.Main
$version
can be 0.1-SNAPSHOT
for the locally published Metals or any version published to Bintray (current latest is 977c902b
)@laughedelic I'm trying to target Visual Studio (non-code) through a VSIX extension.
Superseded by #217
Opened #256 to document how to connect to metals from a new editor client
I'm working on a scala lsp client to connect to sbt server. I'd also like to be able to connect to metals, but I can't find any documentation on how to start the metals server, and how to connect to it (address, wire protocol and initialization object requirements)