Skip to content

Commit 1b0d57e

Browse files
authored
chore: run prettier (#56)
1 parent 20eea64 commit 1b0d57e

File tree

5 files changed

+31
-34
lines changed

5 files changed

+31
-34
lines changed

.vscode/settings.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22
"[typescript]": {
33
"editor.defaultFormatter": "esbenp.prettier-vscode"
44
},
5-
"cSpell.words": [
6-
"acir",
7-
"brillig",
8-
"nargo"
9-
]
5+
"cSpell.words": ["acir", "brillig", "nargo"]
106
}

src/client.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
ServerCapabilities,
2121
ServerOptions,
2222
TextDocumentFilter,
23-
2423
} from "vscode-languageclient/node";
2524

2625
import { extensionName, languageId } from "./constants";
@@ -201,7 +200,10 @@ export default class Client extends LanguageClient {
201200
}
202201

203202
async refreshProfileInfo() {
204-
const response = await this.sendRequest<NargoProfileRunResult>("nargo/profile/run", { package: ""});
203+
const response = await this.sendRequest<NargoProfileRunResult>(
204+
"nargo/profile/run",
205+
{ package: "" }
206+
);
205207

206208
this.profileRunResult = response;
207209
}

src/extension.ts

+22-25
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import { lspClients, editorLineDecorationManager } from "./noir";
4444

4545
let activeCommands: Map<string, Disposable> = new Map();
4646

47-
4847
let activeMutex: Set<string> = new Set();
4948

5049
function mutex(key: string, fn: (...args: unknown[]) => Promise<void>) {
@@ -146,42 +145,40 @@ function registerCommands(uri: Uri) {
146145
commands$.push(command$);
147146
}
148147

149-
150148
let profileCommand$ = commands.registerCommand(
151149
"nargo.profile",
152-
async (...args) => {
153-
154-
window.withProgress({
155-
location: ProgressLocation.Window,
156-
cancellable: false,
157-
title: 'Getting Profile Information'
158-
}, async (progress) => {
159-
160-
progress.report({ increment: 0 });
161-
162-
let workspaceFolder = workspace.getWorkspaceFolder(uri).uri.toString();
163-
const activeClient = lspClients.get(workspaceFolder);
164-
165-
await activeClient.refreshProfileInfo();
166-
editorLineDecorationManager.displayAllTextDecorations();
167-
168-
progress.report({ increment: 100 });
169-
});
170-
150+
async (...args) => {
151+
window.withProgress(
152+
{
153+
location: ProgressLocation.Window,
154+
cancellable: false,
155+
title: "Getting Profile Information",
156+
},
157+
async (progress) => {
158+
progress.report({ increment: 0 });
159+
160+
let workspaceFolder = workspace
161+
.getWorkspaceFolder(uri)
162+
.uri.toString();
163+
const activeClient = lspClients.get(workspaceFolder);
164+
165+
await activeClient.refreshProfileInfo();
166+
editorLineDecorationManager.displayAllTextDecorations();
167+
168+
progress.report({ increment: 100 });
169+
}
170+
);
171171
}
172172
);
173173
commands$.push(profileCommand$);
174174
let hideProfileInformationCommand$ = commands.registerCommand(
175175
"nargo.profile.hide",
176-
async (...args) => {
177-
176+
async (...args) => {
178177
editorLineDecorationManager.hideDecorations();
179-
180178
}
181179
);
182180
commands$.push(hideProfileInformationCommand$);
183181

184-
185182
activeCommands.set(file, Disposable.from(...commands$));
186183
}
187184

src/noir.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ import Client from "./client";
33

44
export let lspClients: Map<string, Client> = new Map();
55

6-
export const editorLineDecorationManager = new EditorLineDecorationManager(lspClients);
6+
export const editorLineDecorationManager = new EditorLineDecorationManager(
7+
lspClients
8+
);

syntaxes/noir.tmLanguage.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,4 +324,4 @@
324324
}
325325
},
326326
"scopeName": "source.nr"
327-
}
327+
}

0 commit comments

Comments
 (0)