I would like to try the new release of Metals, how do I add a new language server?

[original thread by captainwasabi]

You can write VS Code extension and run it with Theia.

In order to test it with Theia: https://github.com/theia-ide/theia/wiki/Testing-VS-Code-extensions

[captainwasabi]

VS Code extension already exists: https://marketplace.visualstudio.com/items?itemName=scalameta.metals#overview

[captainwasabi]

I’m getting this: Unable to find Java 8 home. To fix this problem, update the ‘Java Home’ setting to point to a Java 8 home directory

[captainwasabi]

but in settings I have: “java.home”: “/usr/lib/jvm/java-8-openjdk-amd64”

[captainwasabi]

and JAVA_HOME is set in /etc/environment to that same path

[captainwasabi]

these seem to be the relevant lines in metals-vscode:

[captainwasabi]

import { workspace } from “vscode”;

[captainwasabi]

and

[captainwasabi]

const userJavaHome = workspace.getConfiguration(“metals”).get(“javaHome”);

@captain-wasabi please file an issue we can have a look later

if VS Code extension does not work, you can still go with existing Theia extensions.

Unftortunately, there is no docs for it, you can study https://github.com/theia-ide/theia/tree/master/packages/python instead

We have plans to deprecate them eventually when VS Code extension support is robust.

Possibly the “metals” plugin contains markup for setting default configuration? vscode-xml seems to have the same problem:

Victor Rubezhny is having a look at it.