Skip to content

Commit

Permalink
chore: add prettier documentSelectors update
Browse files Browse the repository at this point in the history
add prettier documentSelectors update
  • Loading branch information
lifeart authored Feb 3, 2024
2 parents 8cf942a + c9ec057 commit 4d0cde1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ eslintConfig.update(
vscode.ConfigurationTarget.Global,
);

const prettierConfig = vscode.workspace.getConfiguration('prettier');
const documentSelectors = prettierConfig.get<Array<string>>('documentSelectors') ?? [];
const glimmerFileExtensions = ['**/*.gts', '**/*.gjs'];

prettierConfig.update(
'documentSelectors',
Array.from(new Set([...documentSelectors, ...glimmerFileExtensions])),
vscode.ConfigurationTarget.Global,
);

export async function activate(context: vscode.ExtensionContext) {
const extension = vscode.extensions.getExtension(typeScriptExtensionId);
if (!extension) {
Expand Down

0 comments on commit 4d0cde1

Please sign in to comment.