Provide completion for expressions inside call arguments#598
Open
Provide completion for expressions inside call arguments#598
Conversation
This was referenced Feb 24, 2026
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
84426e7 to
418fe63
Compare
aab77ce to
ea08a82
Compare
418fe63 to
8eb15f0
Compare
ea08a82 to
0403d9f
Compare
8eb15f0 to
424aa3d
Compare
0403d9f to
291c8f3
Compare
424aa3d to
43c4d78
Compare
291c8f3 to
19864f5
Compare
43c4d78 to
6222da0
Compare
20714f7 to
79b4481
Compare
Morriar
reviewed
Mar 2, 2026
| }; | ||
|
|
||
| // Find the first Method definition to extract keyword parameters | ||
| for def_id in method_decl.definitions() { |
Contributor
There was a problem hiding this comment.
Let's add a few tests showing we only consider the "first" definitions we indexed:
def foo(a, b, c); end # we show this one
def foo(x, y); end Also, are sure the indexing order for the same method in different document is stable?
# file1.rb
def foo(a, b, c); end # we show this one# file2.rb
def foo(x, y); end We should always pick the same. Do we need to sort the definitions() by document URI?
Member
Author
There was a problem hiding this comment.
Added a test for this. We always return the same definition because the hashing of the ID is deterministic, which means that we find the same entry in the hashmap when iterating. I don't believe we need to sort.
79b4481 to
9b43f88
Compare
4fd5c1a to
adde64d
Compare
9b43f88 to
1d446f7
Compare
adde64d to
7c5b733
Compare
1d446f7 to
ec1706f
Compare
ec1706f to
46e0d94
Compare
46e0d94 to
81009f6
Compare
81009f6 to
a03508c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds completion for expressions inside of call arguments. This is a special case of expression completion. It includes everything that you would expect from expression completion + any keyword parameters that the user may refer to.