-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Auto completion #805
Conversation
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 |
Triggering immediately = |
helix-term/src/commands.rs
Outdated
.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); |
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.
This part I find it a little bit complicated, I believe could be simplified.
I've merged #821, hopefully that's good enough |
Init implement auto completeion. Maybe the way is not elegant.