cargo fmt
This commit is contained in:
parent
9dd51e75e0
commit
5c11af1479
5 changed files with 15 additions and 12 deletions
|
@ -678,7 +678,7 @@ impl Registry {
|
||||||
pub fn remove_by_id(&mut self, id: LanguageServerId) {
|
pub fn remove_by_id(&mut self, id: LanguageServerId) {
|
||||||
let Some(client) = self.inner.remove(id) else {
|
let Some(client) = self.inner.remove(id) else {
|
||||||
log::error!("client was already removed");
|
log::error!("client was already removed");
|
||||||
return
|
return;
|
||||||
};
|
};
|
||||||
self.file_event_handler.remove_client(id);
|
self.file_event_handler.remove_client(id);
|
||||||
let instances = self
|
let instances = self
|
||||||
|
|
|
@ -111,7 +111,9 @@ impl AsyncHook for ResolveTimeout {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finish_debounce(&mut self) {
|
fn finish_debounce(&mut self) {
|
||||||
let Some(request) = self.next_request.take() else { return };
|
let Some(request) = self.next_request.take() else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
let (tx, rx) = helix_event::cancelation();
|
let (tx, rx) = helix_event::cancelation();
|
||||||
self.in_flight = Some((tx, request.item.clone()));
|
self.in_flight = Some((tx, request.item.clone()));
|
||||||
tokio::spawn(request.execute(rx));
|
tokio::spawn(request.execute(rx));
|
||||||
|
|
|
@ -119,8 +119,7 @@ pub fn request_signature_help(
|
||||||
// Do not show the message if signature help was invoked
|
// Do not show the message if signature help was invoked
|
||||||
// automatically on backspace, trigger characters, etc.
|
// automatically on backspace, trigger characters, etc.
|
||||||
if invoked == SignatureHelpInvoked::Manual {
|
if invoked == SignatureHelpInvoked::Manual {
|
||||||
editor
|
editor.set_error("No configured language server supports signature-help");
|
||||||
.set_error("No configured language server supports signature-help");
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
@ -300,11 +299,11 @@ fn signature_help_post_insert_char_hook(
|
||||||
let (view, doc) = current!(cx.editor);
|
let (view, doc) = current!(cx.editor);
|
||||||
// TODO support multiple language servers (not just the first that is found), likely by merging UI somehow
|
// TODO support multiple language servers (not just the first that is found), likely by merging UI somehow
|
||||||
let Some(language_server) = doc
|
let Some(language_server) = doc
|
||||||
.language_servers_with_feature(LanguageServerFeature::SignatureHelp)
|
.language_servers_with_feature(LanguageServerFeature::SignatureHelp)
|
||||||
.next()
|
.next()
|
||||||
else {
|
else {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
};
|
||||||
|
|
||||||
let capabilities = language_server.capabilities();
|
let capabilities = language_server.capabilities();
|
||||||
|
|
||||||
|
|
|
@ -145,8 +145,8 @@ fn status(repo: &Repository, f: impl Fn(Result<FileChange>) -> bool) -> Result<(
|
||||||
|
|
||||||
for item in status_iter {
|
for item in status_iter {
|
||||||
let Ok(item) = item.map_err(|err| f(Err(err.into()))) else {
|
let Ok(item) = item.map_err(|err| f(Err(err.into()))) else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
let change = match item {
|
let change = match item {
|
||||||
Item::Modification {
|
Item::Modification {
|
||||||
rela_path, status, ..
|
rela_path, status, ..
|
||||||
|
|
|
@ -233,7 +233,9 @@ fn read_from_clipboard<'a>(
|
||||||
// If we're pasting the same values that we just yanked, re-use
|
// If we're pasting the same values that we just yanked, re-use
|
||||||
// the saved values. This allows pasting multiple selections
|
// the saved values. This allows pasting multiple selections
|
||||||
// even when yanked to a clipboard.
|
// even when yanked to a clipboard.
|
||||||
let Some(values) = saved_values else { return RegisterValues::new(iter::once(contents.into())) };
|
let Some(values) = saved_values else {
|
||||||
|
return RegisterValues::new(iter::once(contents.into()));
|
||||||
|
};
|
||||||
|
|
||||||
if contents_are_saved(values, &contents) {
|
if contents_are_saved(values, &contents) {
|
||||||
RegisterValues::new(values.iter().map(Cow::from).rev())
|
RegisterValues::new(values.iter().map(Cow::from).rev())
|
||||||
|
|
Loading…
Add table
Reference in a new issue