Broadcast completion triggers to remote participants
This commit is contained in:
parent
ed549e352f
commit
91e5c2dfac
5 changed files with 144 additions and 88 deletions
|
@ -911,22 +911,11 @@ impl MultiBuffer {
|
|||
let snapshot = self.snapshot(cx);
|
||||
let anchor = snapshot.anchor_before(position);
|
||||
let buffer = self.buffers.borrow()[&anchor.buffer_id].buffer.clone();
|
||||
if let Some(language_server) = buffer.read(cx).language_server() {
|
||||
language_server
|
||||
.capabilities()
|
||||
.completion_provider
|
||||
.as_ref()
|
||||
.map_or(false, |provider| {
|
||||
provider
|
||||
.trigger_characters
|
||||
.as_ref()
|
||||
.map_or(false, |characters| {
|
||||
characters.iter().any(|string| string == text)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
false
|
||||
}
|
||||
buffer
|
||||
.read(cx)
|
||||
.completion_triggers()
|
||||
.iter()
|
||||
.any(|string| string == text)
|
||||
}
|
||||
|
||||
pub fn apply_additional_edits_for_completion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue