Skip to content

Commit

Permalink
Use the correct formatting contribution point
Browse files Browse the repository at this point in the history
Fixes #41
Fixes #42
  • Loading branch information
Mikael Olenfalk authored and mauve committed Dec 18, 2017
1 parent eab2ccc commit 91fa0df
Show file tree
Hide file tree
Showing 8 changed files with 3,028 additions and 79 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.0.20
======

## What's New
- The formatter now uses the correct Formatting API so that the builtin command for formatting works as expected (closes #42)
- The formatter no longer has a hardcoded list of approved extensions, instead if the document type is 'terraform' then the formatter can be used to that file (closes #41)
- The introduced formatter changes means that the plugin specific configuration for formatting (e.g. `terraform.formatOnSave`) have been deprecated and are no longer used.

0.0.19
======

Expand Down
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
## Features at a glance

- Syntax highlightning for `.tf` and `.tfvars` files (and `.hcl`)
- Automatic format on save using `terraform fmt`
- Automatic formatting using `terraform fmt`
- Automatically closes braces and quotes
- Adds a command for running `terraform validate`
- Linting support with the help of [tflint](https://github.com/wata727/tflint)
Expand All @@ -38,17 +38,9 @@

![Syntax Highlighting](https://raw.githubusercontent.com/mauve/vscode-terraform/master/images/screenshot.png)

## Format on Save
## Formatting support

Optionally you can configure that `terraform fmt` is invoked on save to format your terraform files.
Formatting is done only on files with the extension `.tf` or `.tfvars`, so that you can assign this plugin to
any HCL file type you are using which is not necessary terraform.

Format on save is configured using `terraform.formatOnSave` which defaults to `false`. `.tfvars` files can also
be formatted on save by using the setting `terraform.formatVarsOnSave`, by default this setting is `null`
which means that `.tfvars` files are also configured using the `terraform.formatOnSave` setting. You can
use separate settings for `.tfvars` and `.tf` files by setting `terraform.formatVarsOnSave` to anything
other than `null`.
The plugin also ships a formatter integration which uses `terraform fmt` for formatting editors. Formatting can be disabled by setting `terraform.format.enable` to `false`.

## Linting

Expand Down
Loading

0 comments on commit 91fa0df

Please sign in to comment.