Build configuration and indexing

Import compile_commands.json, configure toolchains and scan your project.

Import a compilation database

The extension reads .vscode/hornet/compile-db/compile_commands.json. Run Hornet C/C++: Import Compilation Database to import an existing database, or use your project's configured CMake build directory.

For CMake projects using Ninja or Makefiles, enable the following in your existing configuration:

cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Cross-compilation also requires your own toolchain file or CMake Preset. Make sure compiler paths, working directories, macros and include paths in the database are valid on the workspace host.

Common settings

{
  "hornet-cpp.mode": "hybrid",
  "hornet-cpp.clangd.path": "clangd",
  "hornet-cpp.cpuUsage": "Medium",
  "hornet-cpp.clangd.ignoreDiagnostics": "not_indexed",
  "hornet-cpp.clangd.enableInlayHints": true,
  "hornet-cpp.syntaxColor.enable": true
}

Project scan scope

By default, the extension recursively scans C/C++ sources and headers, including uppercase extensions, generated folders and third-party folders. Scanning is unaffected by .gitignore、files.exclude or search.exclude ; only Git metadata and items explicitly listed in hornet-cpp.excludePaths are skipped.

There is no folder-depth, file-count or 8 MB per-file limit. Read and parse failures appear in logs. Lightweight indexes live in memory and are rebuilt when the window reopens; Tree-sitter grammars ship with the VSIX.

Refresh the index

In the command palette, run Hornet Build Index, or choose Update Index / Rebuild Index from the status menu. Indexing does not compile or link your project and does not replace its build process.

Search documentation

Enter keywords to find documentation.

Esc Close · Tab Select a result