Skip to content

Conversation

@brianignacio5
Copy link
Collaborator

@brianignacio5 brianignacio5 commented Mar 27, 2025

Description

Add ESP-IDF: Configure project for ESP-Clang command to configure the current workspace project for LLVM Clang extension language server, to allow the user to configure esp-idf project syntax highlighting, go to declaration, etc.

Fixes #1352
Fixes #1484

Type of change

  • New feature (non-breaking change which adds functionality)

Steps to test this pull request

Provide a list of steps to test changes in this PR and required output

  1. Click on ESP-IDF: Configure project for ESP-Clang command.
  2. The idf.customExtraVars should have IDF_TOOLCHAIN and clang.path and clang.arguments should be added to project's .vscode/settings.json. Add .clangd file to project.
  3. Review the user can install esp-clang toolchain with ESP-IDF: Configure ESP-IDF extension and the LLVM Clang extension provide C/C++ language support after running step 1.
  4. Observe results.
  • Expected behaviour:

User can use the esp-clang toolchain and the LLVM Clang extension to provide C/C++ language support (syntax highlight, code navigation, etc.)

  • Expected output:

The clang.path and clang.arguments should be added to project's .vscode/settings.json

Test Configuration:

  • ESP-IDF Version: 5.3.1
  • OS (Windows,Linux and macOS): macOS

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@github-actions
Copy link

github-actions bot commented Mar 27, 2025

Download the artifacts for this pull request:
You can test these changes by installing this VSIX by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension.

@shiinakaze
Copy link

Thank you for your patch.

Copy link
Collaborator

@radurentea radurentea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brianignacio5 brianignacio5 force-pushed the feature/clang-config branch 2 times, most recently from d66fd9d to 62fd9ac Compare April 22, 2025 07:21
@Fabricio-ESP Fabricio-ESP changed the title Feature clang project configuration [VSC-1630] Feature clang project configuration May 5, 2025
@brianignacio5 brianignacio5 force-pushed the feature/clang-config branch from 62fd9ac to a10249e Compare May 9, 2025 08:57
Copy link
Collaborator

@Fabricio-ESP Fabricio-ESP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed working.
Re-adding IDF to the extension or installing a new version will add esp-clang tool to the toolset.

@Fabricio-ESP Fabricio-ESP changed the title [VSC-1630] Feature clang project configuration [VSC-1630 | 1527] Feature clang project configuration May 9, 2025
@brianignacio5 brianignacio5 merged commit 9f1c322 into master May 12, 2025
7 checks passed
@brianignacio5 brianignacio5 deleted the feature/clang-config branch May 12, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot set Clang path to current workspace and project (VSC-1630) [Feature Request]: Better support for clangd extenstion out of the box (VSC-1527)

5 participants