Choose a parsing mode

Understand the capabilities and limits of Hybrid, Flyweight, Compiler and Tag.

Switch modes

Click the mode name in the status bar, or open the command palette and run Hornet C/C++: Switch Parsing Mode. You can also edit settings:

{
  "hornet-cpp.mode": "hybrid"
}

Hybrid · Recommended

Keeps a Tag index and any available Compiler service, automatically choosing a parser per file based on compilation-command coverage.

Requirements:Browse out of the box; semantic features need clangd and a valid compilation database.

Best for:Everyday development, existing projects and gradual build setup。

Flyweight

Runs the bundled Tree-sitter C/C++ WebAssembly parser in a background thread, with incremental syntax trees for recent files.

Requirements:No extra compiler, clangd installation or compile_commands.json required.

Best for:Reading unfamiliar code, lightweight browsing and projects without a build environment。

Compiler

clangd provides semantic navigation, renaming, code actions and live compiler diagnostics. Resolving macros, types and headers requires complete project build configuration.

Requirements:A valid compile_commands.json, clangd and your project's actual toolchain.

Best for:Precise navigation, refactoring and complex C/C++ maintenance。

Tag

Quickly builds a lexical tag index in a background thread for basic symbol browsing, navigation and call relationships.

Requirements:No additional tools required.

Best for:Quick search, basic completion and definition navigation。

Limits of lightweight modes

Tag and Flyweight provide symbol search, outlines, basic completion, definition / declaration navigation, syntax references and call graphs. They do not preprocess, type-check or refactor. Symbols with the same name may produce multiple candidates.

For accurate renaming, code actions and compiler diagnostics, use Compiler or configure per-file compile commands for Hybrid. Flyweight performance depends on your files and editing patterns; it is not always faster than Tag.

Search documentation

Enter keywords to find documentation.

Esc Close · Tab Select a result