-
Notifications
You must be signed in to change notification settings - Fork 170
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
Migrate path completion to YARP #873
Conversation
|
697098f
to
a49bdc1
Compare
|
1 similar comment
|
@@ -182,7 +182,7 @@ def test_completion_is_not_triggered_if_argument_is_not_a_string | |||
|
|||
end_position = { | |||
line: 0, | |||
character: document.source.rindex('"'), | |||
character: document.source.rindex('o') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in #881
|
31aaeb3
to
d5460d2
Compare
def on_tstring_content(node) | ||
@tree.search(node.value).sort.each do |path| | ||
sig { params(node: YARP::StringNode).void } | ||
def on_string_node(node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def on_string_node(node) | |
def on_string(node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 fixed
d5460d2
to
2fa7421
Compare
@@ -27,7 +27,7 @@ def test_completion_command | |||
} | |||
end_position = { | |||
line: 0, | |||
character: document.source.rindex('"'), | |||
character: T.must(document.source.rindex('"')) - 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These off by one errors need to be fixed in YARP. I wonder how hard it would be to help them get this done, so that we can stop altering our tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partially addresses #449
Co-authored with @bitwise-aiden, cherry-picked from @vinistock's WIP version, then updated.
bin/test test/requests/path_completion_test.rb
is passing