Skip to content

Commit

Permalink
Merge pull request #22 from disneystreaming/specify-main-class
Browse files Browse the repository at this point in the history
Specify main class in launch options
  • Loading branch information
daddykotex authored Jun 9, 2023
2 parents af1e1e7 + 198c883 commit e7f4c79
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 e7f4c79

Please sign in to comment.