Skip to content

Commit be73a76

Browse files
committed
format: add semicolons, and remove old code and comment
1 parent 92f09d3 commit be73a76

File tree

9 files changed

+128
-179
lines changed

9 files changed

+128
-179
lines changed

apps/lsp/src/custom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
EditorServerOptions,
2323
sourceServerMethods,
2424
editorServerDocuments,
25-
} from "editor-server"
25+
} from "editor-server";
2626

2727
import { LspConnection, registerLspServerMethods } from "core-node";
2828
import { userDictionaryDir, Document } from "quarto-core";
@@ -116,5 +116,5 @@ async function codeViewCompletions(quarto: Quarto, context: CodeViewCompletionCo
116116
return {
117117
isIncomplete: false,
118118
items: completions || []
119-
}
119+
};
120120
}

apps/vscode/src/providers/editor/codeview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export function vsCompletionItemToLsCompletionItem(item: VCompletionItem): Compl
213213

214214
}
215215

216-
export function labelWithDetails(item: VCompletionItem): { label: string, labelWithDetails: CompletionItemLabelDetails } {
216+
export function labelWithDetails(item: VCompletionItem): { label: string, labelWithDetails: CompletionItemLabelDetails; } {
217217
if (typeof (item.label) === "string") {
218218
return {
219219
label: item.label,

packages/editor-codemirror/src/behaviors/completion.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
pickedCompletion,
2727
snippet,
2828
startCompletion
29-
} from "@codemirror/autocomplete"
29+
} from "@codemirror/autocomplete";
3030

3131
import {
3232
CompletionItem,
@@ -51,7 +51,7 @@ export function completionBehavior(behaviorContext: BehaviorContext): Behavior {
5151

5252
// don't provide behavior if we don't have completions
5353
if (!behaviorContext.pmContext.ui.codeview) {
54-
return {}
54+
return {};
5555
}
5656

5757
return {
@@ -99,7 +99,7 @@ export function completionBehavior(behaviorContext: BehaviorContext): Behavior {
9999
]
100100
})
101101
]
102-
}
102+
};
103103
}
104104

105105
async function getCompletions(
@@ -139,7 +139,7 @@ async function getCompletions(
139139
? context.pos - (item.textEdit.range.end.character - item.textEdit.range.start.character)
140140
: context.pos
141141
: context.pos;
142-
}
142+
};
143143

144144
// use order to create boost
145145
const total = completions.items.length;
@@ -168,7 +168,7 @@ async function getCompletions(
168168
} else {
169169
return undefined;
170170
}
171-
}
171+
};
172172

173173
// return completions
174174
return {
@@ -221,14 +221,14 @@ async function getCompletions(
221221
view.dispatch({
222222
...insertCompletionText(view.state, insertText, from, context.pos),
223223
annotations: pickedCompletion.of(completion)
224-
})
224+
});
225225
if (item.command?.command === "editor.action.triggerSuggest") {
226226
startCompletion(view);
227227
}
228228
}
229229
},
230230
boost: boostScore(index)
231-
}
231+
};
232232
})
233233
};
234234
}
@@ -287,12 +287,12 @@ function infoNodeForItem(item: CompletionItem) {
287287
header.classList.add("cm-completionInfoHeader");
288288
header.innerText = text;
289289
return header;
290-
}
290+
};
291291
const textDiv = (text: string) => {
292292
const span = document.createElement("div");
293293
span.innerText = text;
294294
return span;
295-
}
295+
};
296296

297297
if (item.detail && !item.documentation) {
298298
return headerEl(item.detail, "span");

0 commit comments

Comments
 (0)