VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 48 forks source link

Matching parentheses are not treated like other braces #393

Open RacerEXE opened 2 years ago

RacerEXE commented 2 years ago

Thank you for opening an issue. In this template paragraph text could be removed, however please retain headers.

Prerequisites

Installation details

Terraform Configuration Files

locals {
  foo   = lower("bar")
}

Expected Behavior

What should have happened?

Example 1: hen you place the cursor on the one of the parentheses the other should be highlighted. The behavior works correctly for {} and [].

Example 2: When you hit "^m" at a parentheses, the curser should jump to the matching parentheses.

Furthermore, you can't jump to matching parentheses (^m), when you try it jumps to whatever the enclosing context's brace is. For example If you try to jump from the brace

Actual Behavior

What actually happened?

Example 1: Nothing is highlighted Example 2: The curser jumps to the what ever the enclosing context's parentheses are, for example, if you place your curser on the closing parentheses near bar, and hit ^m, it jumps to the '{' at locals.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Place curser near a "(" and notice that the matching ")" is not highlighted
  2. Place a curser within "(" and ")". Hit ^m and notice that the curser jumps out to the nearest containing brace that isn't a parentheses.