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/schema: Add support for Keyword as Constraint #184

Merged
merged 4 commits into from
Jan 27, 2023

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Jan 16, 2023

Part of hashicorp/terraform-ls#496


hashicorp/terraform-schema@442c5c8 is downstream reflection of this constraint. The examples below leverage that commit. It also however makes it clear that Keyword often in schema relies on OneOf constraint, so for full support of keywords, that constraint has to be implemented.

UX Impact

Since keywords aren't nested, this is expected to be no-op for the end-user and essentially just work the same as before.

Completion

2023-01-23 19 58 09

Hover

2023-01-23 19 58 55

Semantic Tokens

2023-01-23 19 59 14
Screenshot 2023-01-23 at 19 59 47

@radeksimko radeksimko added the enhancement New feature or request label Jan 16, 2023
@radeksimko radeksimko force-pushed the f-expr-cons-keyword branch 5 times, most recently from 92dddb0 to fa9a71f Compare January 23, 2023 17:21
@radeksimko radeksimko self-assigned this Jan 23, 2023
@radeksimko radeksimko marked this pull request as ready for review January 23, 2023 18:01
@radeksimko radeksimko requested a review from a team as a code owner January 23, 2023 18:01
@radeksimko radeksimko marked this pull request as draft January 24, 2023 11:40
@radeksimko radeksimko marked this pull request as ready for review January 24, 2023 11:50
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.

LGTM 👍

I like the separation into multiple files for completion, hover & semantic tokens.

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.

None yet

2 participants