Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Highlighting Breaks If a Function is Split Over Multiple Lines When in String Interpolation #1756

Open
1 task
dli-spoton opened this issue May 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dli-spoton
Copy link

Extension Version

v2.30.1

VS Code Version

Version: 1.89.1 (Universal)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:24.611Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0

Operating System

macOS Sonoma Version 14.4.1 (23E224)

Terraform Version

Terraform v1.5.7 on darwin_arm64

Steps to Reproduce

Create a main.tf with the following:

locals {
  list = [
    "1", "2", "3"
  ]
  function = [
    for i in local.list : "Out: ${join("-", [i, "join"]
    )}" if i != "2"
  ]
}

output "test" {
  value = local.function
}

Expected Behavior

Screenshot 2024-05-15 at 2 05 51 PM
Syntax highlighting works as expected after the closing ) for the join function in v2.29.5

Actual Behavior

Screenshot 2024-05-15 at 2 05 22 PM
Doesn't seem to associate the closing ) to the join() after updating to v2.30.1

Terraform Configuration

No response

Project Structure

No response

Gist

No response

Anything Else?

No response

Workarounds

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@dbanck
Copy link
Member

dbanck commented May 21, 2024

Thank you for the report!

I'm able to reproduce the issue and have created an issue to track the required grammar changes: hashicorp/syntax#128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants