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

decoder: Add support for parenthesis on RHS #366

Merged
merged 4 commits into from
Jan 19, 2024
Merged

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Jan 16, 2024

Closes hashicorp/terraform-ls#529

Operators were already implemented as part of #320


This enables support for parenthesis on the RHS (right hand side), i.e. after =.

For example:

attr = (var.foo + var.bar) * 2

UX Examples

Completion

Screenshot 2024-01-18 at 20 43 49

Screenshot 2024-01-18 at 20 43 31

Hover

Screenshot 2024-01-18 at 20 44 19

Semantic Tokens

Screenshot 2024-01-18 at 20 44 41

Reference Origins

2024-01-18 20 45 17


Follow-up Issues

@radeksimko radeksimko added the enhancement New feature or request label Jan 16, 2024
@radeksimko radeksimko self-assigned this Jan 16, 2024
@radeksimko radeksimko changed the title decoder: Add completion support for parenthesis decoder: Add support for parenthesis Jan 16, 2024
@radeksimko radeksimko force-pushed the f-expr-parenthesis branch 9 times, most recently from 3eeec7e to 3f2ba9e Compare January 18, 2024 20:31
@radeksimko radeksimko changed the title decoder: Add support for parenthesis decoder: Add support for parenthesis on RHS Jan 18, 2024
@radeksimko radeksimko marked this pull request as ready for review January 18, 2024 20:46
@radeksimko radeksimko requested a review from a team as a code owner January 18, 2024 20:46
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@radeksimko radeksimko merged commit ff16b0b into main Jan 19, 2024
9 checks passed
@radeksimko radeksimko deleted the f-expr-parenthesis branch January 19, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support operator expressions (+, -, !=, !...) and parentheses
2 participants