godotengine / godotengine/godot-vscode-plugin
Need a config setting to explicitly specify project file/dir
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
### Godot version
4.2.1
### VS Code version
1.88.1
### Godot Tools VS Code extension version
2.0.0
### System information
MacOS Sonoma 14.1.1
### Problem statement
Currently, if the workspace contains multiple project files GodotTools attempts to find one anywhere in the tree. If multiple project files are found it takes the one with the [shortest absolute path](https://github.com/godotengine/godot-vscode-plugin/blob/2e6eedb19669dcfc9cb44e8047e30cfa29df6fd0/src/utils/project_utils.ts#L23)
This is fine as a default behavior, but if you need it to pick a project that isn't the shortest path, there's no escape hatch.
### Proposed solution
Add support for optional configuration string `godotTools.project_path`. If this is specified then `get_project_dir` in `project_utils.ts` should use this path only. If the explicitly specified project file doesn't exist, it should return `undefined` without searching the workspace.
Contributor guide
Assessment
This issue has not been assessed yet.