Remapping URIs?
First of all, ccls is fantastic, and I sorely miss it whenever I can't use it. One such situation is with CodeQL in Visual Studio, since it creates a read-only copy of the source code, and maps it to codeql-zip-archive:// with vscode.FileSystemProvider.
https://github.com/github/vscode-codeql/blob/fe1476f875e115a1bec6808ff44e5a4245de9fad/extensions/ql-vscode/src/archive-filesystem-provider.ts#L285-L304
Would there be any objections if we were able to remap the URI? e.g. remapping:
codeql-zip-archive://0-42/mnt/space/v8/7.9.317.33/v8/codeql/src.zip/mnt/space/v8/7.9.317.33/v8/
to:
file://mnt/space/v8/7.9.317.33/v8/
The directory /mnt/space/v8/7.9.317.33/v8/ is just a standard local directory that's also writable, while the CodeQL path is not.
Would the correct place to remap codeql-zip-archive://x/y/z/a/b/c to file://a/b/c be in DocumentUri::setPath?
https://github.com/MaskRay/ccls/blob/1dc69f45dc3e0c0f750f5a2e220a6aea54f30d2a/src/lsp.cc#L50-L124
While it is certainly possible to remap the URI in the language server side, it is quite convenient to remap them in vscode-ccls.
I've tried this idea in the past (https://github.com/Riatre/vscode-ccls/commit/607cc26fbe9804d90c04f2e610a135d9ed6d463a) for remote development before VSCode Remote became a thing.