visual-studio-code - 如何在 VSCode 和 Intellij 中设置相同的 Terraform 格式化样式

标签 visual-studio-code intellij-idea terraform

我正在设置一个环境来在 VSCode 中开发 Terraform。

我正在与另一位开发人员合作,他使用 Intellij,而我使用 VSCode。

enter image description here

左边红色部分是用Intellij编写的代码,右边绿色部分是用VSCode编写的代码。

我想将 ESLint 设置为相同,以设置一致的格式。我怎样才能做到这一点?

我已经设置了setting.json

enter image description here

现在我使用扩展

HashiCorp Terraform https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform

Terraform( fork ) https://marketplace.visualstudio.com/items?itemName=l2fprod.terraform-fork

非常感谢。

最佳答案

您可以使用 IntelliJ 文件观察器 功能在每次文件更改时自动运行此功能(非常有用)。

转到首选项 -> 工具 -> 文件观察器 并如下图所示进行配置。

enter image description here

关于visual-studio-code - 如何在 VSCode 和 Intellij 中设置相同的 Terraform 格式化样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70609696/

相关文章:

spring - Resteasy-Spring : incorrect app instance loaded during tests with multiple running instances

visual-studio-code - 将 .sublime-syntax (YAML) 转换为 VSCode 兼容的语法

java - 从 war 文件中读取 list 文件会在 tomcat 7 中产生错误

java - 查看 Intellij 项目中的错误

amazon-web-services - Terraform:附加非托管 IAM 角色

azure - Terraform 为 Linux 容器创建应用程序服务

gulp - 有没有办法在 VSCode 中刷新任务列表?

python - 执行代码时如何打开或关闭 Visual Studio python (Jupyter) 交互窗口 (2019)?

visual-studio-code - 激活conda环境在vscode中停止工作

azure - 使用 Terraform 在 Azure 上部署应用程序服务时出现未经授权的错误