@@ -11,7 +11,7 @@ mod signature;
1111mod traits;
1212mod r#type;
1313
14- use std:: sync:: Arc ;
14+ use std:: { collections :: HashMap , sync:: Arc } ;
1515
1616use crate :: { Emmyrc , FileId , Vfs } ;
1717pub use declaration:: * ;
@@ -169,6 +169,12 @@ impl DbIndex {
169169 self . vfs . update_config ( config. clone ( ) ) ;
170170 self . modules_index . update_config ( config. clone ( ) ) ;
171171 }
172+
173+ pub fn get_snapshot_info ( & self ) -> HashMap < String , String > {
174+ let mut info = HashMap :: new ( ) ;
175+ self . fill_snapshot_info ( & mut info) ;
176+ info
177+ }
172178}
173179
174180impl LuaIndex for DbIndex {
@@ -185,4 +191,18 @@ impl LuaIndex for DbIndex {
185191 self . operator_index . remove ( file_id) ;
186192 self . flow_index . remove ( file_id) ;
187193 }
194+
195+ fn fill_snapshot_info ( & self , info : & mut HashMap < String , String > ) {
196+ self . decl_index . fill_snapshot_info ( info) ;
197+ self . references_index . fill_snapshot_info ( info) ;
198+ self . types_index . fill_snapshot_info ( info) ;
199+ self . modules_index . fill_snapshot_info ( info) ;
200+ self . meta_files_index . fill_snapshot_info ( info) ;
201+ self . members_index . fill_snapshot_info ( info) ;
202+ self . property_index . fill_snapshot_info ( info) ;
203+ self . signature_index . fill_snapshot_info ( info) ;
204+ self . diagnostic_index . fill_snapshot_info ( info) ;
205+ self . operator_index . fill_snapshot_info ( info) ;
206+ self . flow_index . fill_snapshot_info ( info) ;
207+ }
188208}
0 commit comments