Implemented both opt-out settings for vscode config load, although enabled by default:

```json
  // autocomplete.json
  {
    "config": {
      "load_vscode_snippets": false
    }
  }

  // debugger.json
  {
    "config": {
      "load_vscode_launch_config": false
    }
  }
```

Disabling them affects only .vscode imports. Personal/.ecode snippets and .ecode/launch.json continue loading normally.

Refs SpartanJ/ecod€#111
This commit is contained in:
Martín Lucas Golini
2026-08-01 01:38:14 -03:00
parent 323d511eed
commit da4d201eeb
5 changed files with 2424 additions and 10 deletions

View File

@@ -476,6 +476,11 @@ void DebuggerPlugin::loadDAPConfig( const std::string& path, bool updateConfigFi
mSilence = config.value( "silent", true );
else if ( updateConfigFile )
config["silent"] = mSilence;
if ( config.contains( "load_vscode_launch_config" ) )
mLoadVSCodeLaunchConfig = config.value( "load_vscode_launch_config", true );
else if ( updateConfigFile )
config["load_vscode_launch_config"] = mLoadVSCodeLaunchConfig;
}
if ( j.contains( "dap" ) ) {
@@ -689,9 +694,12 @@ void DebuggerPlugin::loadProjectConfigurations() {
}
mThreadPool->run( [this] {
std::string config = mProjectPath + ".vscode/launch.json";
if ( FileSystem::fileExists( config ) )
loadProjectConfiguration( config );
std::string config;
if ( mLoadVSCodeLaunchConfig ) {
config = mProjectPath + ".vscode/launch.json";
if ( FileSystem::fileExists( config ) )
loadProjectConfiguration( config );
}
config = mProjectPath + ".ecode/launch.json";
if ( FileSystem::fileExists( config ) )
loadProjectConfiguration( config );