Clangd configuration

Some of the features clangd has can be configured through command-line flags or other mechanisms. This configuration is pretty ad-hoc and often unsatisfying - for example fixing parsing problems by tweaking compile commands is a common request, but editing compile_commands.json by hand isn’t a good solution.

We get quite a lot of bug reports that are best solved or worked around by fine-grained configuration, but we don’t have a good way to expose that - flags don’t scale forever.

Here’s a proposal to add a general configuration mechanism, and how it would be used for a few things: It doesn’t go into all the things it might be used for, but I think it could cover a lot (most of our command-line flags, many requests for more flexible CDB handling and indexing, etc).

Feedback is welcome - I think we should do something in this area soon (even for the LLVM 11 release), but there may be defects in the design or in the details.

1 Like