Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically Detect Project Files to Activate ESP-IDF Plugin (VSC-1578) #1414

Open
Xinyu-Sheng opened this issue Jan 29, 2025 · 2 comments
Open
Assignees
Labels
Feature / Enhancement Request Request for Feature/ Enhancement

Comments

@Xinyu-Sheng
Copy link

When developing projects based on ESP-IDF using VS Code, it is currently necessary to manually activate the ESP-IDF plugin each time to load the corresponding environment and tools, which is not very convenient. In contrast, PlatformIO can automatically activate its plugin by detecting specific ini files, greatly simplifying the development process. I hope that the ESP-IDF plugin could offer similar functionality, where it would automatically activate upon detecting certain project files (such as sdkconfig or other ESP-IDF-related configuration files) in the current directory, thereby enhancing work efficiency.

I would like to see an implementation where, when a user opens a folder containing an ESP-IDF project, VS Code can automatically recognize the project and activate the ESP-IDF plugin without manual intervention. Specifically, this could be triggered by monitoring the presence of specific files (e.g., sdkconfig, particular content within CMakeLists.txt, etc.) as conditions for activating the plugin.

Currently, one alternative is to manually activate the ESP-IDF plugin through the command palette every time, which is not ideal for developers frequently switching between projects. Another possibility is writing custom scripts to check for these files and activate the plugin, but this adds extra learning and maintenance costs.

Providing such functionality would make the development experience smoother, especially important for those managing multiple different types of projects (including non-ESP-IDF projects) simultaneously. It is hoped that this improvement will be seen in future versions. Additionally, if there are suggestions or discussions on how to better integrate this feature, I am also very willing to participate and contribute.

@Xinyu-Sheng Xinyu-Sheng added the Feature / Enhancement Request Request for Feature/ Enhancement label Jan 29, 2025
@github-actions github-actions bot changed the title Automatically Detect Project Files to Activate ESP-IDF Plugin Automatically Detect Project Files to Activate ESP-IDF Plugin (VSC-1578) Jan 29, 2025
@radurentea
Copy link
Collaborator

Hi @Xinyu-Sheng,

The ESP-IDF extension activates when any of the following files are detected in the workspace currently:

**/project_description.json - A project_description.json file is found (generated during ESP-IDF builds)
**/sdkconfig - A sdkconfig file is found (ESP-IDF project configuration file)
**/CMakeLists.txt - A CMakeLists.txt file is found (ESP-IDF project build file)

Let me know if you had different expectations or if you are having issues with the current activation

@radurentea radurentea self-assigned this Jan 30, 2025
@Xinyu-Sheng
Copy link
Author

@radurentea
I would like to have a stricter detection mechanism because my other projects may currently activate the ESP-IDF extension as they meet the existing rules. To avoid this,could we implement more stringent activation conditions? For example, requiring the presence of multiple specific files unique to ESP-IDF projects, or introducing an additional project-specific identifier that must be present in the workspace for the extension to activate. This would help ensure that the ESP-IDF extension only activates for intended ESP-IDF projects and not for others inadvertently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature / Enhancement Request Request for Feature/ Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants