Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
cswimr committed Jan 12, 2025
1 parent 39632eb commit f0c5ca9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 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 @@ -190,7 +190,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
: vscode.Uri.joinPath(
context.extensionUri,
"bin",
os.platform() === "win32" ? "server.exe" : "server"
os.platform() === "win32" ? "server.exe" : "server",
).fsPath;

const run: Executable = {
Expand Down Expand Up @@ -232,7 +232,7 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
"luau",
"Luau Language Server",
serverOptions,
clientOptions
clientOptions,
);

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

context.subscriptions.push(
Expand All @@ -272,7 +272,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 @@ -286,15 +286,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 f0c5ca9

Please sign in to comment.