Skip to content

Commit 34c4614

Browse files
ivanwonderatscott
authored andcommitted
fix(server): filter unsupported code action (#1834)
Now the Angular code action provider only supports `QuickFix`. If leave the `codeActionKinds` empty, all action requests will be sent to the Angular language service, especially for the action before saving the file, the Angular code action provider will try to fix all errors in the whole file, it's expensive. Fixes #1828 (cherry picked from commit 38729c9)
1 parent 8accb21 commit 34c4614

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

server/src/session.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,14 @@ export class Session {
743743
},
744744
codeActionProvider: this.ivy ? {
745745
resolveProvider: true,
746+
// Now the Angular code action provider only supports `QuickFix`. If leave the
747+
// `codeActionKinds` empty, all action requests will be sent to the Angular language
748+
// service, especially for the action before saving the file, the Angular code action
749+
// provider will try to fix all errors in the whole file, it's expensive.
750+
//
751+
// Find more info
752+
// [here](https://github.com/angular/vscode-ng-language-service/issues/1828)
753+
codeActionKinds: [lsp.CodeActionKind.QuickFix],
746754
} :
747755
undefined,
748756
},

0 commit comments

Comments
 (0)