-
Notifications
You must be signed in to change notification settings - Fork 311
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
Enhance/uninstall improvement #1353
base: master
Are you sure you want to change the base?
Conversation
Download the artifacts for this pull request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes regarding code structure.
try { | ||
// Try to remove from each scope, but handle errors silently | ||
// Global settings | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify this code by reusing these try catch code into a single helper function that receives vscode.ConfigurationTarget.{Global, Workspace, WorkspaceFolder}
and inspection?.{workspaceValue, globalValue, workspaceFolder} !== undefined
arguments.
); | ||
} | ||
|
||
async function removeEspIdfSettings() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why we can't have this function outside the extension.ts
code ? We could move the code into a separated file.
// Get all settings directly from configuration | ||
const allSettings = config.inspect(""); | ||
// Check values saved in each scope | ||
if (allSettings?.globalValue) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findIdfSettings can be simplified into a for loop with an array [allSettings.globalValue, allSettings.workspaceValue, allSettings.workspaceFolderValue]
Pull request has been marked as |
Description
Added command for the user to remove all esp-idf settings from the settings.json files that can be opened with:
And also the settings from .code-workspace (multi-project)
Type of change
Steps to test this pull request
Remove all settings using the command ESP-IDF: Remove ESP-IDF Settings
How has this been tested?
Used the command and saw all the settings were removed as expected.
Test Configuration:
Checklist