Skip to content

Nested block autocompletion has incorrect indent level #162

Closed
@amasover

Description

@amasover

Server Version

0.3.2

Terraform Version

0.12.26

Client Version

Emacs with lsp-mode 20200612.455 from Melpa

Terraform Configuration Files

(Resulting code when autocompleting blocks):

resource "aws_appmesh_mesh" "test" {
  spec {
  egress_filter {
  0
}
}
}

Log Output

https://gist.github.com/amasover/ed2ba0c211bb84cc612f2acc21c79933

Expected Behavior

The spec and egress_filter blocks should be indented at the correct level, like so:

resource "aws_appmesh_mesh" "test" {
  spec {
    egress_filter {
      0
    }
  }
}

Actual Behavior

It seems that autocompleted nested blocks are indented as if they were at the base level (i.e., as if they were not nested).

Steps to Reproduce

  1. Open a Terraform file in Emacs.
  2. Create a resource that has a nested block available (for example, aws_appmesh_mesh or azurerm_container_group.
  3. Start creating a new block inside that resource, and autocomplete it

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/emacshttps://www.gnu.org/software/emacs/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions