sublimelsp / LSP-terraform

Convenience package for the terraform language server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LSP-terraform

A convenience package to take advantage of the Terraform Language Server.

Installation

  1. Install LSP, LSP-terraform and Terraform Syntax from Package Control.
  2. Restart Sublime Text.
  3. (Optional but recommended) Install the LSP-file-watcher-chokidar via Package Control to enable functionality to notify the server about new files.

Optionally install the Terraform CLI for the validateOnSave and formatting functionality.

Configuration

You may edit the default settings by running Preferences: LSP-terraform Settings from the Command Palette.

Optionally you can view terraform-ls settings at Hashicorps repo

Formatting

The server supports formatting for the terraform files (equivalent to running terraform fmt). You can either trigger it manually from the Command Palette using the LSP: Format File command or automatically run it on saving the file. To enable formatting on save, open Preferences: LSP Settings from the Command Palette and add or modify the following setting:

{
    "lsp_code_actions_on_save": {
      "source.formatAll.terraform": true,
    },
}

About

Convenience package for the terraform language server

License:MIT License


Languages

Language:Python 100.0%