Skip to content

Commit

Permalink
lint: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Jul 18, 2023
1 parent fc55d9d commit 995b626
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 160 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"esbuild": "^0.18.13",
"eslint": "^8.44.0",
"patch-package": "^7.0.0",
"prettier": "3.0.0",
"typescript": "^5.1.6"
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/decomp/man-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,21 @@ export async function open_in_pdf(mnemonic: string) {
// Finally, open the PDF
if (selected_option.type == "ee") {
const path = vscode.Uri.parse(
`${config.eeManPagePath}#page=${selected_option.page}`
`${config.eeManPagePath}#page=${selected_option.page}`,
);
vscode.commands.executeCommand(
"vscode.openWith",
path,
"pdf.opengoal.manpage"
"pdf.opengoal.manpage",
);
} else if (selected_option.type == "vu") {
const path = vscode.Uri.parse(
`${config.vuManPagePath}#page=${selected_option.page}`
`${config.vuManPagePath}#page=${selected_option.page}`,
);
vscode.commands.executeCommand(
"vscode.openWith",
path,
"pdf.opengoal.manpage"
"pdf.opengoal.manpage",
);
}
}
20 changes: 10 additions & 10 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function activate(context: vscode.ExtensionContext) {
});

context.subscriptions.push(
vscode.commands.registerCommand("opengoal.switchFile", switchFile)
vscode.commands.registerCommand("opengoal.switchFile", switchFile),
);

activateDecompTools();
Expand All @@ -48,7 +48,7 @@ export async function activate(context: vscode.ExtensionContext) {

// Customized PDF Viewer
const provider = new PdfCustomProvider(
vscode.Uri.file(context.extensionPath)
vscode.Uri.file(context.extensionPath),
);
context.subscriptions.push(
vscode.window.registerCustomEditorProvider(
Expand All @@ -59,33 +59,33 @@ export async function activate(context: vscode.ExtensionContext) {
enableFindWidget: false, // default
retainContextWhenHidden: true,
},
}
)
},
),
);

// TODO - disposable stuff?

// Language Customizations
vscode.languages.registerFoldingRangeProvider(
{ scheme: "file", language: "opengoal-ir" },
new IRFoldingRangeProvider()
new IRFoldingRangeProvider(),
);
vscode.languages.registerInlayHintsProvider(
{ scheme: "file", language: "opengoal-ir" },
new IRInlayHintsProvider()
new IRInlayHintsProvider(),
);
vscode.languages.registerRenameProvider(
{ scheme: "file", language: "opengoal", pattern: "**/*_disasm.gc" },
new OpenGOALDisasmRenameProvider()
new OpenGOALDisasmRenameProvider(),
);
vscode.languages.registerRenameProvider(
{ scheme: "file", language: "opengoal-ir" },
new IRRenameProvider()
new IRRenameProvider(),
);
vscode.languages.registerCompletionItemProvider(
{ scheme: "file", language: "opengoal-ir" },
new IRCompletionItemProvider(),
"@" // NOTE - can't use `"` without overriding a default setting https://github.com/microsoft/vscode/issues/131238#issuecomment-902519923
"@", // NOTE - can't use `"` without overriding a default setting https://github.com/microsoft/vscode/issues/131238#issuecomment-902519923
);

// Start the LSP
Expand All @@ -101,7 +101,7 @@ export async function activate(context: vscode.ExtensionContext) {
vscode.workspace.onDidSaveTextDocument(nreplOnFileSaveHandler);
} catch (err) {
vscode.window.showErrorMessage(
"Failed to activate OpenGOAL extension, see logs for details"
"Failed to activate OpenGOAL extension, see logs for details",
);
getMainChannel().append(`Failed to activate extension - ${err}`);
}
Expand Down
Loading

0 comments on commit 995b626

Please sign in to comment.