11mod client_config;
2+ mod codestyle;
23mod collect_files;
34mod locale;
45mod regsiter_file_watch;
5- mod codestyle;
66
77use std:: { path:: PathBuf , str:: FromStr , sync:: Arc } ;
88
99use crate :: {
10- cmd_args:: CmdArgs , context:: { load_emmy_config, ClientProxy , ServerContextSnapshot , VsCodeStatusBar } , logger:: init_logger
10+ cmd_args:: CmdArgs ,
11+ context:: { load_emmy_config, ClientProxy , ServerContextSnapshot , VsCodeStatusBar } ,
12+ logger:: init_logger,
1113} ;
1214use client_config:: get_client_config;
1315pub use client_config:: ClientConfig ;
@@ -62,6 +64,7 @@ pub async fn initialized_handler(
6264 & context. status_bar ,
6365 workspace_folders,
6466 emmyrc,
67+ client_id,
6568 )
6669 . await ;
6770
@@ -76,6 +79,7 @@ pub async fn init_analysis(
7679 status_bar : & VsCodeStatusBar ,
7780 workspace_folders : Vec < PathBuf > ,
7881 emmyrc : Arc < Emmyrc > ,
82+ client_id : ClientId ,
7983 // todo add cancel token
8084) {
8185 let mut mut_analysis = analysis. write ( ) . await ;
@@ -145,10 +149,13 @@ pub async fn init_analysis(
145149 let mut count = 0 ;
146150 while let Some ( _) = rx. recv ( ) . await {
147151 count += 1 ;
148- status_bar. report_progress (
149- format ! ( "diagnostic {}/{}" , count, file_count) . as_str ( ) ,
150- 0.75 ,
151- ) ;
152+
153+ if client_id. is_vscode ( ) {
154+ status_bar. report_progress (
155+ format ! ( "diagnostic {}/{}" , count, file_count) . as_str ( ) ,
156+ 0.75 ,
157+ ) ;
158+ }
152159 if count == file_count {
153160 break ;
154161 }
@@ -182,7 +189,7 @@ fn get_workspace_folders(params: &InitializeParams) -> Vec<PathBuf> {
182189 workspace_folders
183190}
184191
185- #[ derive( Debug , Clone , Copy ) ]
192+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , PartialOrd , Ord ) ]
186193pub enum ClientId {
187194 VSCode ,
188195 Intellij ,
0 commit comments