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

Support complex index expressions #365

Merged
merged 7 commits into from
Jan 19, 2024
Merged

Support complex index expressions #365

merged 7 commits into from
Jan 19, 2024

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Jan 15, 2024

This PR adds support for references and functions in index expressions. It enables the usual functions like, completion, hover, etc.

With a reference in the index expression, we only collect that reference instead of the whole expression.

UX Examples

Completion

2024-01-17 10 43 12

Hover

CleanShot 2024-01-17 at 10 43 27@2x

Semantic Tokens

CleanShot 2024-01-17 at 10 43 53@2x

Go to definition

2024-01-17 10 43 41


@dbanck dbanck added the enhancement New feature or request label Jan 15, 2024
@dbanck dbanck self-assigned this Jan 15, 2024
@dbanck dbanck force-pushed the f-complex-index-expr branch from 706e13b to 39dea4f Compare January 16, 2024 11:38
@dbanck dbanck force-pushed the f-complex-index-expr branch from 39dea4f to 13836c4 Compare January 16, 2024 16:32
@dbanck dbanck marked this pull request as ready for review January 17, 2024 10:49
@dbanck dbanck requested a review from a team as a code owner January 17, 2024 10:49
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

Mostly minor suggestions and questions in-line, otherwise LGTM!

decoder/expr_any_completion.go Outdated Show resolved Hide resolved
decoder/expr_any_completion_test.go Show resolved Hide resolved
decoder/expr_any_index.go Outdated Show resolved Hide resolved
decoder/expr_any_index.go Outdated Show resolved Hide resolved
decoder/expr_any_index.go Outdated Show resolved Hide resolved
decoder/expr_any_completion_test.go Show resolved Hide resolved
decoder/expr_any_hover.go Show resolved Hide resolved
decoder/expr_any_completion.go Outdated Show resolved Hide resolved
decoder/expr_any_index.go Outdated Show resolved Hide resolved
decoder/expr_any_semtok.go Show resolved Hide resolved
@dbanck dbanck merged commit 0298dc8 into main Jan 19, 2024
5 checks passed
@dbanck dbanck deleted the f-complex-index-expr branch January 19, 2024 14:11
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 more complex index expressions (elem[key])
2 participants