Skip to content

Commit

Permalink
Specify main class in launch options
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Jun 9, 2023
1 parent af1e1e7 commit 198c883
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ export function activate(context: ExtensionContext) {
const launcher = ["launch", finalLanguageServerArtifact];
// m2Local is relevant when `gradle` is used to publish locally
// coursier default resolvers are ivy2Local and maven central at the time of writing
const coursierOptions = ["--ttl", "1h", "--repository", "m2Local"].concat(
javaOptions
);
const coursierOptions = [
"--ttl",
"1h",
"--repository",
"m2Local",
// Necessary since the inclusion of Smithy CLI in the LS dependencies
"--main-class",
"software.amazon.smithy.lsp.Main",
].concat(javaOptions);

const split = ["--"];
const lspArguments = ["0"]; // port 0 means we use std in/out to exchange with the language server
const args = launcher.concat(coursierOptions, split, lspArguments);
Expand Down

0 comments on commit 198c883

Please sign in to comment.