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

369 completion for activerecord queries #526

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ChallaHalla
Copy link

No description provided.

Comment on lines +13 to +15
response_builder: ResponseBuilders::CollectionResponseBuilder[T.any(
Interface::Location, Interface::LocationLink
)],
Copy link

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.

Copy link
Author

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]}:"),
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant