fix: Clear proc-macro changed flag when reloading workspace
This commit is contained in:
@@ -45,6 +45,7 @@ use crate::{
|
|||||||
|
|
||||||
pub(crate) fn handle_workspace_reload(state: &mut GlobalState, _: ()) -> Result<()> {
|
pub(crate) fn handle_workspace_reload(state: &mut GlobalState, _: ()) -> Result<()> {
|
||||||
state.proc_macro_client = None;
|
state.proc_macro_client = None;
|
||||||
|
state.proc_macro_changed = false;
|
||||||
state.fetch_workspaces_queue.request_op("reload workspace request".to_string());
|
state.fetch_workspaces_queue.request_op("reload workspace request".to_string());
|
||||||
state.fetch_build_data_queue.request_op("reload workspace request".to_string());
|
state.fetch_build_data_queue.request_op("reload workspace request".to_string());
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ impl GlobalState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn fetch_build_data(&mut self, cause: Cause) {
|
pub(crate) fn fetch_build_data(&mut self, cause: Cause) {
|
||||||
tracing::debug!(%cause, "will fetch build data");
|
tracing::info!(%cause, "will fetch build data");
|
||||||
let workspaces = Arc::clone(&self.workspaces);
|
let workspaces = Arc::clone(&self.workspaces);
|
||||||
let config = self.config.cargo();
|
let config = self.config.cargo();
|
||||||
self.task_pool.handle.spawn_with_sender(move |sender| {
|
self.task_pool.handle.spawn_with_sender(move |sender| {
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ export class Ctx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setServerStatus(status: ServerStatusParams) {
|
setServerStatus(status: ServerStatusParams) {
|
||||||
this.statusBar.tooltip = status.message ?? "Ready";
|
|
||||||
let icon = "";
|
let icon = "";
|
||||||
switch (status.health) {
|
switch (status.health) {
|
||||||
case "ok":
|
case "ok":
|
||||||
|
this.statusBar.tooltip = status.message ?? "Ready";
|
||||||
this.statusBar.command = undefined;
|
this.statusBar.command = undefined;
|
||||||
this.statusBar.color = undefined;
|
this.statusBar.color = undefined;
|
||||||
this.statusBar.backgroundColor = undefined;
|
this.statusBar.backgroundColor = undefined;
|
||||||
@@ -105,7 +105,7 @@ export class Ctx {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!status.quiescent) icon = "$(sync~spin) ";
|
if (!status.quiescent) icon = "$(sync~spin) ";
|
||||||
this.statusBar.text = `${icon} rust-analyzer`;
|
this.statusBar.text = `${icon}rust-analyzer`;
|
||||||
}
|
}
|
||||||
|
|
||||||
pushCleanup(d: Disposable) {
|
pushCleanup(d: Disposable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user