Clangd engine
The C++ language engine in Fleet is based on clangd.
Clangd configuration files
To tune the clangd engine for your needs, use clangd configuration files.
For shared project-level settings, use .clangd. These files can contain, for example, compiler flags for both the whole project and for specific files.
For user-level settings, use config.yaml files in OS-specific directories.
Example of using .clangd: enabling CUDA support
In order to enable full support for CUDA files, make the following adjustments in the CompileFlags section of your .clangd:
For Windows
CompileFlags: Remove: - -forward-unknown-to-host-compiler - --generate-code* - -rdc=* - -Xcompiler* Add: - --cuda-path=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.0For Linux (tested on Ubuntu)
CompileFlags: Remove: - -forward-unknown-to-host-compiler - --generate-code* - -rdc=* - -Xcompiler*
Clangd settings
Apart from configuration files, you can also use two settings to configure clangd:
Go to
(⌘ ,).Switch to the Global tab.
In the left-hand pane, select
.Enable hidden tweaks - turn on the features provided by the
--hidden-features
flag.clangd arguments - use this field for additional clangd flags.
Clangd indexer
The Clangd-based indexer helps improve the performance and quality of search operations.
Go to
(⌘ ,).Switch to your project's tab.
In the left-hand pane, select
.Use JetBrains clangd for indexing - enable the clangd indexer.
Use dynamic clangd index - turn on to improve search speed in the recently opened files.