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

Auto completion #805

Closed
wants to merge 6 commits into from
Closed

Conversation

cossonleo
Copy link
Contributor

Init implement auto completeion. Maybe the way is not elegant.

@archseer
Copy link
Member

archseer commented Oct 3, 2021

I have another prototype here with idle timers: https://github.com/helix-editor/helix/tree/idle-timer

Instant completion would then be an idle timer of zero.

helix-core/src/syntax.rs Outdated Show resolved Hide resolved
@cossonleo
Copy link
Contributor Author

I have another prototype here with idle timers: https://github.com/helix-editor/helix/tree/idle-timer

Instant completion would then be an idle timer of zero.

Personally, I prefer to trigger immediately

@archseer
Copy link
Member

archseer commented Oct 7, 2021

Triggering immediately = idle_timer = 0ms

Comment on lines 3364 to 3377
.map(|puns| match puns {
Some(puns) => puns.iter().any(|pun| pre_char.ends_with(pun)),
None => false,
})
.or_else(|| {
doc.language_server().and_then(|cap| {
cap.capabilities()
.completion_provider
.as_ref()
.and_then(|cp| cp.trigger_characters.as_ref())
.map(|puns| puns.iter().any(|pun| pre_char.ends_with(pun)))
})
})
.unwrap_or(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

This part I find it a little bit complicated, I believe could be simplified.

@archseer
Copy link
Member

I've merged #821, hopefully that's good enough

@archseer archseer closed this Oct 10, 2021
@cossonleo cossonleo deleted the auto_completion branch October 27, 2021 09:55
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.

3 participants