Use workspace/didChangeWatchedFiles from BSP to communicate file changes to the build system

This commit is contained in:
Alex Hoppen
2024-09-06 14:58:27 -07:00
parent b4d04ce983
commit e38d37e01c
11 changed files with 31 additions and 12 deletions

View File

@@ -212,8 +212,8 @@ extension CompilationDatabaseBuildSystem: BuiltInBuildSystem {
}
}
package func filesDidChange(_ events: [FileEvent]) async {
if events.contains(where: { self.fileEventShouldTriggerCompilationDatabaseReload(event: $0) }) {
package func didChangeWatchedFiles(notification: BuildServerProtocol.DidChangeWatchedFilesNotification) async {
if notification.changes.contains(where: { self.fileEventShouldTriggerCompilationDatabaseReload(event: $0) }) {
await self.reloadCompilationDatabase()
}
}