-
Notifications
You must be signed in to change notification settings - Fork 180
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
Resolve issue with tfvars comment toggling #937
Conversation
Thank you @NachoxMacho for this! We've been tracking similar reports but did not make the connection to tfvar files specifically. Can you adjust the whitespace indents for this change to 2 spaces and push up those changes? If you can't, I'll push up the change later. |
Not sure I'm following, I'm showing indentation at 2 spaces in my vscode session, and everything is appearing lined up. Am I missing something? |
If you look at the git diff, it shows the difference in spacing: If I run And if I amend those changes onto your commit, I get only the lines your changed showing: If this doesn't work for you locally, there could be an editor setting or git config setting that is overriding spacing. I'm happy to adjust it, this shouldn't block adding your welcome addition. |
If you could adjust it, that would be great. I'm not getting any output from git diff so I'm guessing somewhere I have it configured to ignore whitespace changes like this. I'll take a look at it but don't want to hold up these changes on me figuring out my weird settings. |
Done! Took a little longer because you opened this PR from main on your fork. It's easier if you create a branch, commit there, then open a PR from that branch, but no worries. Thanks again! |
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.
Tested with an empty folder, created a new tfvars file. Once file was created, extension activated and comment functionality was available
Thank you for the contribution! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
This fixes a bug with comment toggling found while I was using the extension. Basically, if a user opens a
*.tfvars
first, it breaks the comment toggling in*.tfvars
files till the session is reloaded. This adds the explicit mapping to the configuration files, and activates the extension once a*.tfvars
file is opened, and doesn't rely on a*.tf
file to be loaded first.Resolves #936 and may be related to #480