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

feat: auto apply checksum when starting VSCode #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zent1n0
Copy link

@zent1n0 zent1n0 commented Dec 6, 2024

Auto apply feature from iewnfod/vscode-fix-checksums

src/extension.js Outdated
@@ -17,6 +17,9 @@ exports.activate = function activate(context) {
vscode.commands.registerCommand('fixChecksums.restore', restore)
)
cleanupOrigFiles()

const auto = vscode.workspace.getConfiguration().get("checksums.autoFix")
apply(auto)
Copy link
Owner

Choose a reason for hiding this comment

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

Seems that it always applies whether you set auto fix or not. The option just hides the message, not controls the behavior

Copy link
Author

@zent1n0 zent1n0 Dec 6, 2024

Choose a reason for hiding this comment

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

Yes, seems auto only controls message, then the logic should be correct with a if clause.

However, the plugin code doesn't load with VSCode extension server starting, but on the first command was executed, thus the function call apply(auto) seems no sense.

Or shall we set the plugin activate on start up to trigger an Apply event?

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.

2 participants