1) Toolchain ID is no longer unique; XcodeDefault toolchains may be
registered multiple times as long as their path is different
(e.g. different Xcode versions). At the moment no other toolchain
may be duplicated.
2) `BuildSystem` specifies a `Toolchain` directly instead of a
Toolchain identifier.
3) New methods to access Toolchains in the registry:
- All toolchain(s) with the given identifier
- Toolchain (if any) for the given path
Add remaining foldingRange protocol capabilities
Sending offset data to folding requests
FoldingRange test
Support folding comments
Add test for folded comments
Replaces the Hover request extension that was only provides by Swift
with the new symbolInfo LSP extension that clangd also support. This
enables jump-to-defintion an find-references for C/C++/ObjC by using
clangd to find the symbol and then performing an index query to find the
defintion.
rdar://46436917
Clangd provides a symbolInfo request as an extension to LSP that is
equivalent to sourcekitd's cursor info. For now, just add the new types
and add plumb the request through so we can test it in isolation. In a
future commit this will be used to power jump-to-definition.
This rewrites most of the functions for scanning for toolchains to be
single-purpose and factors the configuration (e.g. specific directories
and environment variable names) to only the highest level API. Clients
can now generally use the shared toolchain registry and ignore all the
scanning logic. Incidentally switches to keeping toolchains in order of
registration to avoid non-determinism.