diff options
author | wojciechkepka | 2021-06-20 19:31:45 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-21 03:59:06 +0000 |
commit | cc357d50964ecd5760f1367a8a7b63fd45a0f1ce (patch) | |
tree | 5a6787d955cf3c990e029aeb5845a6e3f18e5577 /helix-lsp/src | |
parent | b2804b14b13c511cbf9c3bba88e1687a0d0908a8 (diff) |
Add progress spinners to status line
Diffstat (limited to 'helix-lsp/src')
-rw-r--r-- | helix-lsp/src/lib.rs | 4 |
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)) |