diff --git a/src/index.ts b/src/index.ts index ccdad28..aee3f3e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,6 +32,16 @@ eslintConfig.update( vscode.ConfigurationTarget.Global, ); +const prettierConfig = vscode.workspace.getConfiguration('prettier'); +const documentSelectors = prettierConfig.get>('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) {