Skip to content

Commit 11f63cb

Browse files
committed
chore: adjustments associated with pretteir updates
1 parent 2a48b19 commit 11f63cb

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/completion.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,16 @@ export class SelectorCompletionItemProvider implements CompletionItemProvider, D
221221
const ids = new Map<string, CompletionItem>();
222222
const classes = new Map<string, CompletionItem>();
223223

224-
keys.forEach((key) =>
225-
this.cache.get(key)?.forEach((e) => {
226-
const res = e.kind === CompletionItemKind.Value ? ids : classes;
227-
// ---- custom fix ----
228-
e.label = e.label.replace('\\', '');
229-
e.insertText = e.label.replace('\\', '');
230-
// ---- /custom fix ----
231-
res.set(e.label, e);
232-
})
224+
keys.forEach(
225+
(key) =>
226+
this.cache.get(key)?.forEach((e) => {
227+
const res = e.kind === CompletionItemKind.Value ? ids : classes;
228+
// ---- custom fix ----
229+
e.label = e.label.replace('\\', '');
230+
e.insertText = e.label.replace('\\', '');
231+
// ---- /custom fix ----
232+
res.set(e.label, e);
233+
}),
233234
);
234235

235236
return { ids, classes };
@@ -265,8 +266,8 @@ export class SelectorCompletionItemProvider implements CompletionItemProvider, D
265266
Diagnostic.create(
266267
Range.create(start, end),
267268
`CSS selector '${value[1]}' not found.`,
268-
DiagnosticSeverity.Information
269-
)
269+
DiagnosticSeverity.Information,
270+
),
270271
);
271272
}
272273
}
@@ -283,7 +284,7 @@ export class SelectorCompletionItemProvider implements CompletionItemProvider, D
283284

284285
if (canComplete) {
285286
this.findAll(document).then((context) =>
286-
resolve([...(canComplete[1] === 'id' ? context.ids : context.classes).values()])
287+
resolve([...(canComplete[1] === 'id' ? context.ids : context.classes).values()]),
287288
);
288289
} else {
289290
resolve([]);

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ export async function activate(context: ExtensionContext): Promise<void> {
1515
context.subscriptions.push(
1616
commands.registerCommand('html-css-support.dispose', () => provider.dispose()),
1717
languages.registerCompletionItemProvider('html-css-support', 'HCS', enabledLanguages, provider),
18-
provider
18+
provider,
1919
);
2020

2121
/** MEMO: Custom commands for coc-html-css-support */
2222
context.subscriptions.push(
23-
commands.registerCommand('html-css-support.customDataSetup', customDataSetupCommand(context))
23+
commands.registerCommand('html-css-support.customDataSetup', customDataSetupCommand(context)),
2424
);
2525
}
2626

0 commit comments

Comments
 (0)