@@ -205,11 +205,25 @@ def get_config_suggestions(_params: any) -> dict[str, any]:
205205 test_framework_suggestions , default_test_framework = get_suggestions (CommonSections .test_framework )
206206 formatter_suggestions , default_formatter = get_suggestions (CommonSections .formatter_cmds )
207207 get_valid_subdirs .cache_clear ()
208+
209+ configured_module_root = Path (server .args .module_root ).relative_to (Path .cwd ()) if server .args .module_root else None
210+ configured_tests_root = Path (server .args .tests_root ).relative_to (Path .cwd ()) if server .args .tests_root else None
211+ configured_test_framework = server .args .test_framework if server .args .test_framework else None
212+
213+ configured_formatter = ""
214+ if isinstance (server .args .formatter_cmds , list ):
215+ configured_formatter = " && " .join ([cmd .strip () for cmd in server .args .formatter_cmds ])
216+ elif isinstance (server .args .formatter_cmds , str ):
217+ configured_formatter = server .args .formatter_cmds .strip ()
218+
208219 return {
209- "module_root" : {"choices" : module_root_suggestions , "default" : default_module_root },
210- "tests_root" : {"choices" : tests_root_suggestions , "default" : default_tests_root },
211- "test_framework" : {"choices" : test_framework_suggestions , "default" : default_test_framework },
212- "formatter_cmds" : {"choices" : formatter_suggestions , "default" : default_formatter },
220+ "module_root" : {"choices" : module_root_suggestions , "default" : configured_module_root or default_module_root },
221+ "tests_root" : {"choices" : tests_root_suggestions , "default" : configured_tests_root or default_tests_root },
222+ "test_framework" : {
223+ "choices" : test_framework_suggestions ,
224+ "default" : configured_test_framework or default_test_framework ,
225+ },
226+ "formatter_cmds" : {"choices" : formatter_suggestions , "default" : configured_formatter or default_formatter },
213227 }
214228
215229
0 commit comments