@@ -67,21 +67,25 @@ pub(crate) struct GlobalState {
67
67
req_queue : ReqQueue ,
68
68
pub ( crate ) task_pool : Handle < TaskPool < Task > , Receiver < Task > > ,
69
69
pub ( crate ) loader : Handle < Box < dyn vfs:: loader:: Handle > , Receiver < vfs:: loader:: Message > > ,
70
- pub ( crate ) vfs_config_version : u32 ,
71
- pub ( crate ) flycheck : Vec < FlycheckHandle > ,
72
- pub ( crate ) flycheck_sender : Sender < flycheck:: Message > ,
73
- pub ( crate ) flycheck_receiver : Receiver < flycheck:: Message > ,
74
70
pub ( crate ) config : Arc < Config > ,
75
71
pub ( crate ) analysis_host : AnalysisHost ,
76
72
pub ( crate ) diagnostics : DiagnosticCollection ,
77
73
pub ( crate ) mem_docs : FxHashMap < VfsPath , DocumentData > ,
78
74
pub ( crate ) semantic_tokens_cache : Arc < Mutex < FxHashMap < Url , SemanticTokens > > > ,
79
- pub ( crate ) vfs : Arc < RwLock < ( vfs:: Vfs , FxHashMap < FileId , LineEndings > ) > > ,
80
75
pub ( crate ) shutdown_requested : bool ,
81
76
pub ( crate ) status : Status ,
82
77
pub ( crate ) source_root_config : SourceRootConfig ,
83
78
pub ( crate ) proc_macro_client : Option < ProcMacroClient > ,
84
79
80
+ pub ( crate ) flycheck : Vec < FlycheckHandle > ,
81
+ pub ( crate ) flycheck_sender : Sender < flycheck:: Message > ,
82
+ pub ( crate ) flycheck_receiver : Receiver < flycheck:: Message > ,
83
+
84
+ pub ( crate ) vfs : Arc < RwLock < ( vfs:: Vfs , FxHashMap < FileId , LineEndings > ) > > ,
85
+ pub ( crate ) vfs_config_version : u32 ,
86
+ pub ( crate ) vfs_progress_n_total : usize ,
87
+ pub ( crate ) vfs_progress_n_done : usize ,
88
+
85
89
/// For both `workspaces` and `workspace_build_data`, the field stores the
86
90
/// data we actually use, while the `OpQueue` stores the result of the last
87
91
/// fetch.
@@ -129,23 +133,27 @@ impl GlobalState {
129
133
GlobalState {
130
134
sender,
131
135
req_queue : ReqQueue :: default ( ) ,
132
- vfs_config_version : 0 ,
133
136
task_pool,
134
137
loader,
135
- flycheck : Vec :: new ( ) ,
136
- flycheck_sender,
137
- flycheck_receiver,
138
138
config : Arc :: new ( config) ,
139
139
analysis_host,
140
140
diagnostics : Default :: default ( ) ,
141
141
mem_docs : FxHashMap :: default ( ) ,
142
142
semantic_tokens_cache : Arc :: new ( Default :: default ( ) ) ,
143
- vfs : Arc :: new ( RwLock :: new ( ( vfs:: Vfs :: default ( ) , FxHashMap :: default ( ) ) ) ) ,
144
143
shutdown_requested : false ,
145
144
status : Status :: default ( ) ,
146
145
source_root_config : SourceRootConfig :: default ( ) ,
147
146
proc_macro_client : None ,
148
147
148
+ flycheck : Vec :: new ( ) ,
149
+ flycheck_sender,
150
+ flycheck_receiver,
151
+
152
+ vfs : Arc :: new ( RwLock :: new ( ( vfs:: Vfs :: default ( ) , FxHashMap :: default ( ) ) ) ) ,
153
+ vfs_config_version : 0 ,
154
+ vfs_progress_n_total : 0 ,
155
+ vfs_progress_n_done : 0 ,
156
+
149
157
workspaces : Arc :: new ( Vec :: new ( ) ) ,
150
158
fetch_workspaces_queue : OpQueue :: default ( ) ,
151
159
workspace_build_data : None ,
0 commit comments