Skip to content

Commit

Permalink
Strip "metals." prefix from workspace/executeCommand requests.
Browse files Browse the repository at this point in the history
This allows clients to optionally choose whether to include a
`"metals."` prefix or not. Fixes #838.
  • Loading branch information
Olafur Pall Geirsson committed Oct 17, 2019
1 parent 616c101 commit 2aeedc7
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -1055,7 +1055,8 @@ class MetalsLanguageServer(
params: ExecuteCommandParams
): CompletableFuture[Object] = {
import JsonParser._
params.getCommand match {
val command = Option(params.getCommand).getOrElse("")
command.stripPrefix("metals.") match {
case ServerCommands.ScanWorkspaceSources() =>
Future {
indexWorkspaceSources()
Expand Down

0 comments on commit 2aeedc7

Please sign in to comment.