JetBrains Fleet 1.48 Help

Configuring the clangd engine

The C++ language engine in Fleet is powered by clangd.

clangd configuration files

To customize the behavior of the clangd engine, use clangd configuration files.

  • For shared project-level settings, use a .clangd file. It can include compiler flags for the entire project or specific files.

  • For user-level settings, use a config.yaml file located in one of the OS-specific directories.

Example: enabling CUDA support in .clangd

To enable full support for CUDA files, adjust the CompileFlags section in your .clangd file:

  • On 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
  • On Linux (tested on Ubuntu):

    CompileFlags: Remove: - -forward-unknown-to-host-compiler - --generate-code* - -rdc=* - -Xcompiler*

Clangd settings

You can also configure Clangd by editing the settings.json file.

Configure Clangd settings

  1. Press ⌘ , to open settings.

    Alternatively, to open settings, you can use the main menu:

    • Windows and Linux: click the Menu icon and navigate to File | Settings | Settings.

      workspace settings
    • macOS: from the main menu, click Fleet | Settings.

      workspace settings
  2. Click the tab with the name of your workspace.

  3. Navigate to Tools | Clangd.

  4. Click Edit in settings.json.

    In the file, specify the following parameters as needed:

    { "lsp.clangd.compilation.databases": ["build/compile_commands.json"], "lsp.use.clangd.dynamic.index": true, "lsp.use.clangd.indexer": true }
    Clangd settings in settings.json

Clangd indexer

The clangd-based indexer improves the performance and accuracy of search operations in your C++ projects.

Configure the clangd indexer

  1. Press ⌘ , to open settings.

    Alternatively, to open settings, you can use the main menu:

    • Windows and Linux: click the Menu icon and navigate to File | Settings | Settings.

      workspace settings
    • macOS: from the main menu, click Fleet | Settings.

      workspace settings
  2. Click the tab with the name of your workspace.

  3. In the left-hand pane, navigate to Tools | Clangd indexer.

    Clangd indexer settings
    • Use JetBrains clangd for indexing: enables the JetBrains-provided clangd indexer.

    • Use dynamic clangd index: improves search performance in recently opened files.

22 May 2025