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

Resolve completion item #1315

Merged

Conversation

Gabrielbdd
Copy link
Contributor

This one solves the issue: 1313

That is my first contribution to a Rust project, and to this project, so I'm really open to receive suggestions 😄

Talking about the solution, I adopted the suggestions that I received on the Matrix chat, from the user "archseer".

The suggestion was to request the language server directly from Completion component, and use block_on since this component does not have any way of enqueuing async jobs yet.

helix-lsp/src/client.rs Outdated Show resolved Hide resolved
helix-term/src/ui/completion.rs Outdated Show resolved Hide resolved
helix-term/src/ui/completion.rs Outdated Show resolved Hide resolved
helix-term/src/ui/completion.rs Outdated Show resolved Hide resolved
helix-term/src/ui/completion.rs Outdated Show resolved Hide resolved
helix-term/src/ui/completion.rs Outdated Show resolved Hide resolved
@Gabrielbdd Gabrielbdd force-pushed the feature/1313-resolve-completion-item branch from f1b9b5a to f33a938 Compare December 21, 2021 02:51
@Gabrielbdd Gabrielbdd marked this pull request as ready for review December 21, 2021 20:40
@Gabrielbdd Gabrielbdd force-pushed the feature/1313-resolve-completion-item branch from f33a938 to fa63de0 Compare December 22, 2021 00:58
Copy link
Member

@archseer archseer left a comment

Choose a reason for hiding this comment

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

We only want to call resolve if client.capabilities().completion_provider.resolve_provider == Some(true). Other than that it looks 👍🏻

Copy link
Member

@archseer archseer left a comment

Choose a reason for hiding this comment

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

Great work! 🎉

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.

Extend completion to support language servers which requires an additional "completion item resolve" request
4 participants