aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSahandevs <[email protected]>2021-02-07 17:57:21 +0000
committerSahandevs <[email protected]>2021-02-07 17:57:21 +0000
commit1d0e93b58ee3a43881526c9405ca0120fe6ddb20 (patch)
tree21e936badd25815f720f36f4092beb9bb014a00c
parenteb69f67ab7dd5acb7b5a5cfd34031c73bd54b629 (diff)
handle promise catches
-rw-r--r--editors/code/.eslintrc.js2
-rw-r--r--editors/code/src/client.ts2
-rw-r--r--editors/code/src/inlay_hints.ts2
-rw-r--r--editors/code/src/run.ts2
4 files changed, 4 insertions, 4 deletions
diff --git a/editors/code/.eslintrc.js b/editors/code/.eslintrc.js
index ffdd6ba25..b145330a0 100644
--- a/editors/code/.eslintrc.js
+++ b/editors/code/.eslintrc.js
@@ -14,7 +14,7 @@ module.exports = {
14 "rules": { 14 "rules": {
15 "camelcase": ["error"], 15 "camelcase": ["error"],
16 "eqeqeq": ["error", "always", { "null": "ignore" }], 16 "eqeqeq": ["error", "always", { "null": "ignore" }],
17 "no-console": ["error"], 17 "no-console": ["error", { allow: ["warn", "error"] }],
18 "prefer-const": "error", 18 "prefer-const": "error",
19 "@typescript-eslint/member-delimiter-style": [ 19 "@typescript-eslint/member-delimiter-style": [
20 "error", 20 "error",
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index e436eefb9..6f2d48d1d 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -138,7 +138,7 @@ export function createClient(serverPath: string, cwd: string, extraEnv: Env): lc
138 command: "rust-analyzer.applyActionGroup", 138 command: "rust-analyzer.applyActionGroup",
139 title: "", 139 title: "",
140 arguments: [items.map((item) => { 140 arguments: [items.map((item) => {
141 return { label: item.title, arguments: item.command!!.arguments!![0] }; 141 return { label: item.title, arguments: item.command.arguments[0] };
142 })], 142 })],
143 }; 143 };
144 144
diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts
index 38eb1c15b..61db6b8d0 100644
--- a/editors/code/src/inlay_hints.ts
+++ b/editors/code/src/inlay_hints.ts
@@ -36,7 +36,7 @@ export function activateInlayHints(ctx: Ctx) {
36 maybeUpdater.onConfigChange, maybeUpdater, ctx.subscriptions 36 maybeUpdater.onConfigChange, maybeUpdater, ctx.subscriptions
37 ); 37 );
38 38
39 maybeUpdater.onConfigChange(); 39 maybeUpdater.onConfigChange().catch(console.error);
40} 40}
41 41
42const typeHints = createHintStyle("type"); 42const typeHints = createHintStyle("type");
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts
index 77f9a0991..50c17bc7f 100644
--- a/editors/code/src/run.ts
+++ b/editors/code/src/run.ts
@@ -66,7 +66,7 @@ export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick,
66 quickPick.onDidHide(() => close()), 66 quickPick.onDidHide(() => close()),
67 quickPick.onDidAccept(() => close(quickPick.selectedItems[0])), 67 quickPick.onDidAccept(() => close(quickPick.selectedItems[0])),
68 quickPick.onDidTriggerButton((_button) => { 68 quickPick.onDidTriggerButton((_button) => {
69 (async () => await makeDebugConfig(ctx, quickPick.activeItems[0].runnable))(); 69 makeDebugConfig(ctx, quickPick.activeItems[0].runnable).catch(console.error);
70 close(); 70 close();
71 }), 71 }),
72 quickPick.onDidChangeActive((active) => { 72 quickPick.onDidChangeActive((active) => {