Skip to content

Commit dacb28d

Browse files
committed
dont use $0 as this is already default behavior of vscode
1 parent c24ee55 commit dacb28d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

typescript/src/completions/objectLiteralCompletions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ export default (prior: ts.CompletionInfo): ts.CompletionEntry[] | void => {
5151
if (!enableMoreVariants) continue
5252
const getQuotedSnippet = (): [string, string] => {
5353
const quote = tsFull.getQuoteFromPreference(tsFull.getQuotePreference(node!.getSourceFile() as any, preferences))
54-
return [`: ${quote}$1${quote},$0`, `: ${quote}${quote},`]
54+
return [`: ${quote}$1${quote},`, `: ${quote}${quote},`]
5555
}
5656
const insertObjectArrayInnerText = c('objectLiteralCompletions.insertNewLine') ? '\n\t$1\n' : '$1'
5757
const booleanCompletion = getBooleanCompletion(type, typeChecker)
5858
const completingStyleMap = [
5959
[getQuotedSnippet, isStringCompletion],
6060
[[`: ${booleanCompletion?.[0] ?? ''},`, `: ${booleanCompletion?.[0] ?? ''}`], () => booleanCompletion?.length === 1],
61-
[[': ${1|true,false|},$0', `: true/false,`], () => booleanCompletion?.length === 2],
62-
[[`: [${insertObjectArrayInnerText}],$0`, `: [],`], isArrayCompletion],
63-
[[`: {${insertObjectArrayInnerText}},$0`, `: {},`], isObjectCompletion],
61+
[[': ${1|true,false|},', `: true/false,`], () => booleanCompletion?.length === 2],
62+
[[`: [${insertObjectArrayInnerText}],`, `: [],`], isArrayCompletion],
63+
[[`: {${insertObjectArrayInnerText}},`, `: {},`], isObjectCompletion],
6464
] as const
6565
const fallbackSnippet = c('objectLiteralCompletions.fallbackVariant') ? ([': $0,', ': ,'] as const) : undefined
6666
const insertSnippetVariant = completingStyleMap.find(([, detector]) => detector(type!, typeChecker))?.[0] ?? fallbackSnippet

0 commit comments

Comments
 (0)