Skip to content

Commit

Permalink
Fix prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Nov 30, 2024
1 parent 13a5fb8 commit 603b86c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions editors/code/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as utils from "./utils";
export type PlatformContext = { client: LanguageClient | undefined };
export type AddArgCallback = (
argument: string,
mode?: "All" | "Prod" | "Debug"
mode?: "All" | "Prod" | "Debug",
) => void;

let client: LanguageClient | undefined = undefined;
Expand All @@ -43,7 +43,7 @@ const getFFlags = async () => {
() =>
fetch(CURRENT_FFLAGS)
.then((r) => r.json() as Promise<FFlagsEndpoint>)
.then((r) => r.applicationSettings)
.then((r) => r.applicationSettings),
);
};

Expand Down Expand Up @@ -87,7 +87,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
if (vscode.workspace.workspaceFolders) {
uri = utils.resolveUri(
vscode.workspace.workspaceFolders[0].uri,
definitionPath
definitionPath,
);
} else {
uri = vscode.Uri.file(definitionPath);
Expand All @@ -96,7 +96,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
addArg(`--definitions=${uri.fsPath}`);
} else {
vscode.window.showWarningMessage(
`Definitions file at ${definitionPath} does not exist, types will not be provided from this file`
`Definitions file at ${definitionPath} does not exist, types will not be provided from this file`,
);
}
}
Expand All @@ -111,7 +111,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
if (vscode.workspace.workspaceFolders) {
uri = utils.resolveUri(
vscode.workspace.workspaceFolders[0].uri,
documentationPath
documentationPath,
);
} else {
uri = vscode.Uri.file(documentationPath);
Expand All @@ -120,7 +120,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
addArg(`--docs=${uri.fsPath}`);
} else {
vscode.window.showWarningMessage(
`Documentations file at ${documentationPath} does not exist`
`Documentations file at ${documentationPath} does not exist`,
);
}
}
Expand Down Expand Up @@ -150,7 +150,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
}
} catch (err) {
vscode.window.showWarningMessage(
"Failed to fetch current Luau FFlags: " + err
"Failed to fetch current Luau FFlags: " + err,
);
}
}
Expand All @@ -168,7 +168,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
for (let [name, value] of Object.entries(overridenFFlags)) {
if (!isAlphanumericUnderscore(name)) {
vscode.window.showWarningMessage(
`Invalid FFlag name: '${name}'. It can only contain alphanumeric characters`
`Invalid FFlag name: '${name}'. It can only contain alphanumeric characters`,
);
}

Expand All @@ -185,7 +185,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
command: vscode.Uri.joinPath(
context.extensionUri,
"bin",
os.platform() === "win32" ? "server.exe" : "server"
os.platform() === "win32" ? "server.exe" : "server",
).fsPath,
args,
};
Expand All @@ -196,7 +196,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
context.extensionUri,
"..",
"..",
process.env["SERVER_PATH"] ?? "unknown.exe"
process.env["SERVER_PATH"] ?? "unknown.exe",
).fsPath,
args: debugArgs,
};
Expand Down Expand Up @@ -227,7 +227,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
"luau",
"Luau Language Server",
serverOptions,
clientOptions
clientOptions,
);

platformContext.client = client;
Expand Down Expand Up @@ -258,7 +258,7 @@ export async function activate(context: vscode.ExtensionContext) {
if (client) {
client.sendNotification("$/flushTimeTrace");
}
})
}),
);

context.subscriptions.push(
Expand All @@ -267,7 +267,7 @@ export async function activate(context: vscode.ExtensionContext) {
vscode.window
.showInformationMessage(
"Luau FFlags have been changed, reload server for this to take effect.",
"Reload Language Server"
"Reload Language Server",
)
.then((command) => {
if (command === "Reload Language Server") {
Expand All @@ -281,15 +281,15 @@ export async function activate(context: vscode.ExtensionContext) {
vscode.window
.showInformationMessage(
"Luau type definitions have been changed, reload server for this to take effect.",
"Reload Language Server"
"Reload Language Server",
)
.then((command) => {
if (command === "Reload Language Server") {
vscode.commands.executeCommand("luau-lsp.reloadServer");
}
});
}
})
}),
);

await startLanguageServer(context);
Expand Down

0 comments on commit 603b86c

Please sign in to comment.