Skip to content

terraformls

https://github.com/hashicorp/terraform-ls

Terraform language server Download a released binary from https://github.com/hashicorp/terraform-ls/releases.

Setup

require'lspconfig'.terraformls.setup{}

Default values

cmd = { "terraform-ls", "serve" }
filetypes = { "terraform" }
root_dir = function(startpath)
    return M.search_ancestors(startpath, matcher)
  end

Available settings

terraform-ls.excludeRootModules

  • Type: array
  • Default: {}
  • Array items:

Per-workspace list of module directories for the language server to exclude

terraform-ls.experimentalFeatures

  • Type: object

Experimental (opt-in) terraform-ls features

terraform-ls.rootModules

  • Type: array
  • Default: {}
  • Array items:

Per-workspace list of module directories for the language server to read

terraform.languageServer

  • Type: object
  • Default: { args = { "serve" }, external = true, maxNumberOfProblems = 100, pathToBinary = "", ["trace.server"] = "off" }

Language Server settings

Back to top