Don't flycheck while the workspace is being loaded

This commit is contained in:
Lukas Wirth 2022-08-04 14:01:33 +02:00
parent df9d3db82f
commit df7f755e3b
3 changed files with 5 additions and 2 deletions

View file

@ -72,7 +72,6 @@ impl DiagnosticCollection {
let check_fixes = Arc::make_mut(&mut self.check_fixes);
check_fixes.entry(flycheck_id).or_default().entry(file_id).or_default().extend(fix);
diagnostics.push(diagnostic);
tracing::warn!(?flycheck_id, ?file_id, "add_check_diagnostic changes pushed");
self.changes.insert(file_id);
}

View file

@ -192,6 +192,7 @@ impl GlobalState {
if let Some(path) = vfs.file_path(file.file_id).as_path() {
let path = path.to_path_buf();
if reload::should_refresh_for_change(&path, file.change_kind) {
tracing::warn!("fetch-fiel_change");
self.fetch_workspaces_queue
.request_op(format!("vfs file change: {}", path.display()));
}

View file

@ -447,7 +447,10 @@ impl GlobalState {
let memdocs_added_or_removed = self.mem_docs.take_changes();
if self.is_quiescent() {
if !was_quiescent {
if !was_quiescent
&& !self.fetch_workspaces_queue.op_requested()
&& !self.fetch_build_data_queue.op_requested()
{
for flycheck in &self.flycheck {
flycheck.update();
}