-
Notifications
You must be signed in to change notification settings - Fork 28
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
369 completion for activerecord queries #526
base: main
Are you sure you want to change the base?
Conversation
response_builder: ResponseBuilders::CollectionResponseBuilder[T.any( | ||
Interface::Location, Interface::LocationLink | ||
)], |
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.
The type annotation for response_builder
should be CollectionResponseBuilder[Interface::CompletionItem]
to match the signature in create_completion_listener
. The current type (Location
and LocationLink
) appears to have been copied from a different request handler.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
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.
ty graphite
label_details: Interface::CompletionItemLabelDetails.new( | ||
description: "Filter #{T.must(@node_context.call_node).receiver.name} records by #{column[0]}", | ||
), | ||
text_edit: Interface::TextEdit.new(range: 0, new_text: "#{column[0]}:"), |
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.
The range
parameter expects an Interface::Range
object that specifies where in the document to insert the completion text. Using 0
as a value will cause incorrect insertion behavior. Consider constructing a proper range object based on the current cursor position or token boundaries.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
No description provided.