MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / progress_begin

Method progress_begin

src/util.rs:1768–1790  ·  view source on GitHub ↗

Send a `WorkDoneProgressBegin` notification for the given token. `title` is the short label shown by the editor (e.g. "Indexing"). `message` is an optional detail line (e.g. "Scanning subprojects").

(
        &self,
        token: &NumberOrString,
        title: &str,
        message: Option<String>,
    )

Source from the content-addressed store, hash-verified

1766 /// `title` is the short label shown by the editor (e.g. "Indexing").
1767 /// `message` is an optional detail line (e.g. "Scanning subprojects").
1768 pub(crate) async fn progress_begin(
1769 &self,
1770 token: &NumberOrString,
1771 title: &str,
1772 message: Option<String>,
1773 ) {
1774 use tower_lsp::lsp_types::notification::Progress;
1775
1776 let Some(client) = &self.client else { return };
1777 client
1778 .send_notification::<Progress>(ProgressParams {
1779 token: token.clone(),
1780 value: ProgressParamsValue::WorkDone(WorkDoneProgress::Begin(
1781 WorkDoneProgressBegin {
1782 title: title.to_string(),
1783 cancellable: Some(false),
1784 message,
1785 percentage: Some(0),
1786 },
1787 )),
1788 })
1789 .await;
1790 }
1791
1792 /// Send a `WorkDoneProgressReport` notification with a percentage
1793 /// and optional message.

Callers 4

initializedMethod · 0.80
goto_implementationMethod · 0.80
referencesMethod · 0.80
subtypesMethod · 0.80

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected