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

Implement textDocument/formatting #51

Merged
merged 2 commits into from
Apr 22, 2020
Merged

Implement textDocument/formatting #51

merged 2 commits into from
Apr 22, 2020

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Apr 15, 2020

Closes #28

@radeksimko radeksimko added the enhancement New feature or request label Apr 15, 2020
@radeksimko radeksimko force-pushed the f-formatting branch 4 times, most recently from ef36ca6 to 591e82f Compare April 17, 2020 15:50
@radeksimko radeksimko requested a review from a team April 17, 2020 15:53
@radeksimko
Copy link
Member Author

radeksimko commented Apr 20, 2020

I'm half thinking if it's worth still replacing the hclwrite.Format with a call out to terraform fmt. We receive bytes from there anyway.

The only downside is a little more plumbing/mocking in tests and potentially different failure scenarios, but I'm still leaning more towards doing it.

@aeschright
Copy link
Contributor

I think this looks good, aside from making a decision on that detail.

@radeksimko radeksimko merged commit 6053e80 into master Apr 22, 2020
@radeksimko radeksimko deleted the f-formatting branch April 22, 2020 07:42
@musabmasood
Copy link

Dumb question, how can I enable this in vscode? terraform fmt doesn't seem to be running on save. Just updated to 2.0.1 plugin, everything else seems to be working fine.

@aeschright
Copy link
Contributor

It uses the VSCode settings here: hashicorp/vscode-terraform#375 (comment)

You won't see a call out to terraform fmt specifically because it's routed through the language server.

@ghost
Copy link

ghost commented Jun 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement textDocument/formatting
3 participants