Allow querying the build system for the language of a document

The build system has potentially  more information about a document's language than we do based on the file’s extension.
This commit is contained in:
Alex Hoppen
2024-05-02 08:56:31 -07:00
parent 932f92c63d
commit 9ff1ff1430
7 changed files with 45 additions and 2 deletions

View File

@@ -267,6 +267,10 @@ extension BuildServerBuildSystem: BuildSystem {
return buildSettings[document]
}
public func defaultLanguage(for document: DocumentURI) async -> Language? {
return nil
}
public func registerForChangeNotifications(for uri: DocumentURI) {
let request = RegisterForChanges(uri: uri, action: .register)
_ = self.buildServer?.send(request) { result in