Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
Bump metals-languageclient
Browse files Browse the repository at this point in the history
Also move over the remaing `initializationOptions` in order for it
to fully configure using `initializationOptions`. For now the client
will remain in there, but we will remove it after the next stable
release
  • Loading branch information
ckipp01 committed Jul 14, 2020
1 parent 4feec59 commit a9bc5ee
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
},
"dependencies": {
"coc.nvim": "0.0.77",
"metals-languageclient": "0.2.7",
"metals-languageclient": "0.2.8",
"promisify-child-process": "4.1.1",
"vscode-languageserver-protocol": "3.15.3"
}
Expand Down
37 changes: 23 additions & 14 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
getServerOptions,
JavaConfig,
restartServer,
MetalsInitializationOptions,
} from "metals-languageclient";
import * as path from "path";
import {
Expand Down Expand Up @@ -175,26 +176,34 @@ async function launchMetals(
clientName: "coc-metals",
});

const initializationOptions: MetalsInitializationOptions = {
compilerOptions: {
completionCommand: "editor.action.triggerSuggest",
isCompletionItemResolve: false,
overrideDefFormat: "unicode",
parameterHintsCommand: "editor.action.triggerParameterHints",
},
debuggingProvider:
workspace.isNvim &&
(await workspace.nvim.getVar("loaded_vimpector")) === 1,
decorationProvider: workspace.isNvim,
didFocusProvider: true,
doctorProvider: "json",
executeClientCommandProvider: true,
inputBoxProvider: true,
quickPickProvider: true,
slowTaskProvider: true,
statusBarProvider: statusBarEnabled ? "on" : "show-message",
treeViewProvider: true,
};

const clientOptions: LanguageClientOptions = {
documentSelector: [{ scheme: "file", language: "scala" }],
synchronize: {
configurationSection: "metals",
},
revealOutputChannelOn: RevealOutputChannelOn.Never,
initializationOptions: {
debuggingProvider:
workspace.isNvim &&
(await workspace.nvim.getVar("loaded_vimpector")) === 1,
decorationProvider: workspace.isNvim,
didFocusProvider: true,
doctorProvider: "json",
executeClientCommandProvider: true,
inputBoxProvider: true,
quickPickProvider: true,
slowTaskProvider: true,
statusBarProvider: statusBarEnabled ? "on" : "show-message",
treeViewProvider: true,
},
initializationOptions,
};

const client = new LanguageClient(
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3280,10 +3280,10 @@ merge2@^1.2.3:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81"
integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==

[email protected].7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/metals-languageclient/-/metals-languageclient-0.2.7.tgz#b83be9ad41b26ef492c8ce437256c520b05ea28c"
integrity sha512-iZfEI/gAzAmzuc8M+ALBbWGHgk3VjwWaEKkgJChHdl2Ase/DSkNvnCkJwfG3JD4aksS9YA1C0nSf+pLIU7r6kA==
[email protected].8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/metals-languageclient/-/metals-languageclient-0.2.8.tgz#82687c65bc386a50c6c3dfc2d1c7192629f98527"
integrity sha512-RGy28w9iYwGt3im5Da6YjD9eF6GTKtrRvluWy8StfwbHvI/KsobF1zmyVX/fD0wvNUCY0am867rImkjs1paTzA==
dependencies:
fp-ts "^2.4.1"
locate-java-home "^1.1.2"
Expand Down

0 comments on commit a9bc5ee

Please sign in to comment.