@@ -565,6 +565,7 @@ pub struct Config {
565565 data : ConfigData ,
566566 detached_files : Vec < AbsPathBuf > ,
567567 snippets : Vec < Snippet > ,
568+ is_visual_studio : bool ,
568569}
569570
570571type ParallelCachePrimingNumThreads = u8 ;
@@ -760,6 +761,7 @@ impl Config {
760761 root_path : AbsPathBuf ,
761762 caps : ClientCapabilities ,
762763 workspace_roots : Vec < AbsPathBuf > ,
764+ is_visual_studio : bool ,
763765 ) -> Self {
764766 Config {
765767 caps,
@@ -769,6 +771,7 @@ impl Config {
769771 root_path,
770772 snippets : Default :: default ( ) ,
771773 workspace_roots,
774+ is_visual_studio,
772775 }
773776 }
774777
@@ -1336,6 +1339,7 @@ impl Config {
13361339 }
13371340
13381341 pub fn inlay_hints ( & self ) -> InlayHintsConfig {
1342+ dbg ! ( "TODO kb" ) ;
13391343 let client_capability_fields = self
13401344 . caps
13411345 . text_document
@@ -1667,6 +1671,12 @@ impl Config {
16671671 pub fn typing_autoclose_angle ( & self ) -> bool {
16681672 self . data . typing_autoClosingAngleBrackets_enable
16691673 }
1674+
1675+ // FIXME: VSCode seems to work wrong sometimes, see https://github.com/microsoft/vscode/issues/193124
1676+ // hence, distinguish it for now.
1677+ pub fn is_visual_studio ( & self ) -> bool {
1678+ self . is_visual_studio
1679+ }
16701680}
16711681// Deserialization definitions
16721682
@@ -2555,8 +2565,12 @@ mod tests {
25552565
25562566 #[ test]
25572567 fn proc_macro_srv_null ( ) {
2558- let mut config =
2559- Config :: new ( AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) , Default :: default ( ) , vec ! [ ] ) ;
2568+ let mut config = Config :: new (
2569+ AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
2570+ Default :: default ( ) ,
2571+ vec ! [ ] ,
2572+ false ,
2573+ ) ;
25602574 config
25612575 . update ( serde_json:: json!( {
25622576 "procMacro_server" : null,
@@ -2567,8 +2581,12 @@ mod tests {
25672581
25682582 #[ test]
25692583 fn proc_macro_srv_abs ( ) {
2570- let mut config =
2571- Config :: new ( AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) , Default :: default ( ) , vec ! [ ] ) ;
2584+ let mut config = Config :: new (
2585+ AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
2586+ Default :: default ( ) ,
2587+ vec ! [ ] ,
2588+ false ,
2589+ ) ;
25722590 config
25732591 . update ( serde_json:: json!( {
25742592 "procMacro" : { "server" : project_root( ) . display( ) . to_string( ) }
@@ -2579,8 +2597,12 @@ mod tests {
25792597
25802598 #[ test]
25812599 fn proc_macro_srv_rel ( ) {
2582- let mut config =
2583- Config :: new ( AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) , Default :: default ( ) , vec ! [ ] ) ;
2600+ let mut config = Config :: new (
2601+ AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
2602+ Default :: default ( ) ,
2603+ vec ! [ ] ,
2604+ false ,
2605+ ) ;
25842606 config
25852607 . update ( serde_json:: json!( {
25862608 "procMacro" : { "server" : "./server" }
0 commit comments