Skip to content

Commit

Permalink
fix: document features not working in *.ts on takeover mode
Browse files Browse the repository at this point in the history
close #1563
  • Loading branch information
johnsoncodehk committed Jul 16, 2022
1 parent 54e327c commit a01ef46
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion extensions/vscode-vue-language-features/src/common.ts
Expand Up @@ -261,7 +261,14 @@ function getInitializationOptions(
} : {}),
} : undefined,
documentFeatures: mode === 'document-features' ? {
allowedLanguageIds: ['vue', enabledDocumentFeaturesInHtml() ? 'html' : undefined].filter(shared.notEmpty),
allowedLanguageIds: [
'vue',
'javascript',
'typescript',
'javascriptreact',
'typescriptreact',
enabledDocumentFeaturesInHtml() ? 'html' : undefined,
].filter(shared.notEmpty),
selectionRange: true,
foldingRange: true,
linkedEditingRange: true,
Expand Down
Expand Up @@ -7,7 +7,13 @@ export function register(
connection: vscode.Connection,
documents: vscode.TextDocuments<TextDocument>,
vueDs: vue.DocumentService,
allowedLanguageIds: string[] = ['vue'],
allowedLanguageIds: string[] = [
'vue',
'javascript',
'typescript',
'javascriptreact',
'typescriptreact',
],
) {
connection.onDocumentFormatting(handler => {
return worker(handler.textDocument.uri, document => {
Expand Down

0 comments on commit a01ef46

Please sign in to comment.