Clangd engine
The C++ language engine in Fleet is based on clangd.
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.
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.0
For Linux (tested on Ubuntu)
CompileFlags: Remove: - -forward-unknown-to-host-compiler - --generate-code* - -rdc=* - -Xcompiler*
note
Your project may require more flags to be listed in the
Remove
section.Error messages like Unknown argument: '...' will indicate which flags to add.
Apart from configuration files, you can also use two settings to configure clangd:
Go to Fleet | Settings (Ctrl0,).
Switch to the Global tab.
In the left-hand pane, select Tools | Clangd.
Enable hidden tweaks - turn on the features provided by the
--hidden-features
flag.clangd arguments - use this field for additional clangd flags.
The Clangd-based indexer helps improve the performance and quality of search operations.
Go to Fleet | Settings (Ctrl0,).
Switch to your project's tab.
In the left-hand pane, select Tools | Clangd indexer.
Use JetBrains clangd for indexing - enable the clangd indexer.
Use dynamic clangd index - turn on to improve search speed in the recently opened files.
Thanks for your feedback!