This addresses issue 403.
Goal
Provide code completion for entire STL, even if it was not yet used in the project and thus is not contained in any index.
Design:
Generate a header file that includes all of STL. Then inject this file into the background indexer.
Pros:
- relatively easy to implement, reusing background index for the hard work
Cons:
- need to write to a file
- file needs to be close to project to find compilation database
- not sure when file can be deleted after background indexer finishes
- need to check with every opened file if we still need to perform the STL indexing
Notes:
to enable the feature run clangd with the new flag --index-stl.
nit: "the standard library"
for two reasons: