aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
authorwojciechkepka2021-06-20 19:31:45 +0000
committerBlaž Hrastnik2021-06-21 03:59:06 +0000
commitcc357d50964ecd5760f1367a8a7b63fd45a0f1ce (patch)
tree5a6787d955cf3c990e029aeb5845a6e3f18e5577 /helix-lsp
parentb2804b14b13c511cbf9c3bba88e1687a0d0908a8 (diff)
Add progress spinners to status line
Diffstat (limited to 'helix-lsp')
-rw-r--r--helix-lsp/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 49d5527f..b25a7aca 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -347,6 +347,10 @@ impl LspProgressMap {
self.0.get(&id)
}
+ pub fn is_progressing(&self, id: usize) -> bool {
+ self.0.get(&id).map(|it| !it.is_empty()).unwrap_or_default()
+ }
+
/// Returns last progress status for a given server with `id` and `token`.
pub fn progress(&self, id: usize, token: &lsp::ProgressToken) -> Option<&ProgressStatus> {
self.0.get(&id).and_then(|values| values.get(token))