nit: llvm::StringSet<> or DenseSet<string> are the usual type here
this is a clever technique. (Why not just use compilationDatabaseChanges directly? I suppose because then you have to deal more with path canonicalization?)
it risks having the CDB change concurrently and reloading those files too, though.
Yeah I think compilationDatabaseChanges would be equivalent to what is here now, I can just swap to that.
For the perma subscribe I wasn't sure of the threading. If addDocument is thread safe I think we're okay to just call Server->AddDocument from whatever thread without holding a mutex?
Let's make the minimal change here and land this.
ClangdServer isn't threadsafe, that's a good point.
This is the minimal change, let's do that.