Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from haifengkao/iosSupport
Browse files Browse the repository at this point in the history
support ios for Sourcekit-lsp
  • Loading branch information
vknabel authored Mar 11, 2020
2 parents 86f2fd8 + b0421ba commit 72a6cb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/clientMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@ function currentServerOptions(context: ExtensionContext) {
const toolchain = workspace
.getConfiguration("sourcekit-lsp")
.get<string>("toolchainPath");

// sourcekit-lsp takes -Xswiftc arguments like "swift build", but it doesn't need "build" argument
let sourceKitArgs = (<string[]>(
workspace.getConfiguration().get("sde.swiftBuildingParams")
) || []).filter(param => param !== "build")

const env: NodeJS.ProcessEnv = toolchain
? { ...process.env, SOURCEKIT_TOOLCHAIN_PATH: toolchain }
: process.env;

const run: Executable = { command: executableCommand, options: { env } };
const run: Executable = { command: executableCommand, options: { env }, args: sourceKitArgs};
const serverOptions: ServerOptions = run;
return serverOptions;
}
Expand Down

0 comments on commit 72a6cb1

Please sign in to comment.