Skip to content

Commit

Permalink
perf: avoid create file watcher on syntactic server
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Nov 28, 2022
1 parent f36414d commit debb64f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function createCommonLanguageServer(
});
}

if (params.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration) {
if (options.serverMode !== ServerMode.Syntactic && params.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration) {
connection.client.register(vscode.DidChangeWatchedFilesNotification.type, {
watchers: [
...plugins.map(plugin => plugin.extraFileExtensions.map(ext => ({ globPattern: `**/*.${ext.extension}` }))).flat(),
Expand Down

0 comments on commit debb64f

Please sign in to comment.