As part of our ongoing effort to extend precise code intelligence to as many languages as possible, we’ve developed lsif-clang, a new LSIF indexer based on the clangd language server. This means that customers using C and C++ now have access to precise code intelligence. This improves on the work we did with lsif-cpp in several ways:
compile_commands.jsondatabase file. This format is already in wide use, with tools to generate it for CMake, Bazel, and Make-based projects, and this standardization will make setting up the indexer a lot easier.
lsif-clang is a fork of clangd and leverages the huge body of work that has already gone into efficient indexing of C++ projects. All the credit goes to the contributors who wrote clangd; we’ve simply added LSIF as an output format.
This project is still quite young, and we’re going to iterate on it quickly in the next little while. There will inevitably be some kinks with platform compatibility to iron out. It’s not guaranteed that lsif-clang will be a better fit than lsif-cpp for every project, since the C++ build ecosystem is so fragmented, so lsif-cpp will still be available indefinitely.
GitHub issue: #10175