This is LSP(Language Server Protocol) for Terraform
NOTE: This is first stage of the plugin, so is experimental
Release can be found here
- download go modules
GO111MODULE=on go mod download
- run make or
go build
- install nixpkgs
nix-build
- Variables complex completion(infinite nesting type)
- Provider Config completion
- Resource(with infinite block, looking at you kubernetes provider ;) ) completion
- Data source completion
- Dynamic Error Checking(Terraform and HCL checks)
- Communication using provider binary(so it will support any provider as long as is built with terraform 0.12 sdk)
- Module nesting(inifinte as well) variable completion
All Todos are listed here
Feature | Description | Status |
---|---|---|
completion | Autocompletion | Supported for Resources/Data Sources/Variables/Locals, need support for nested interpolation |
publishDiagnostics | Error checking | Supported, need to check for all possible errors |
hover | Hover on function/variables to get result | Need to Implement |
signatureHelp | get docs for resources/data sources name and params | Need to Implement |
declaration | Go to Declaration | Need to Implement |
references | Find all references | Need to Implement |
implementation | Find all implementation | Need to Implement(not sure if is applicable) |
documentHighlight | resources/data sources/variables highlight | Need to Implement |
documentSymbol | resources/data sources/variables symbols | Need to Implement |
codeAction | Refactoring actions | Need to Implement |
codeLens | VSCode's code lens | Need to Implement |
formatting | Formatting | Need to Implement |
rename | Rename action | Need to Implement |
workspace | Workspace support | Need to Implement |
Editor | Status | Docs |
---|---|---|
Visual Studio Code | Supported | Link |
Atom | Supported | Link |
Vim | Supported | Link |
Sublime Text 3 | Supported | Link |
Intellij | Supported | Link |
Emacs | Supported | Link |
NOTE: Please create a issue for a editor that you want to test for
- Order of completion items
- Issue with block
- LSP structure using Sourcegraph's go-lsp
- JSONRPC2 using JRPC2
- provider communication is mostly adapted from tfschema