-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Problem
When running BrighterScript in language server mode, such as within VSCode, the workspace context should limit which bsconfig.json files are detected. Currently, if a user opens a subfolder (e.g., C:/projects/alpha/build/) in a separate VSCode window, the language server incorrectly walks upwards in the file tree and discovers the parent C:/projects/alpha/bsconfig.json. This is not desired; we only want to use configuration files from within a user's active workspaceFolder context in the editor.
For CLI usage (such as building from nested folders), walking upward to find parent bsconfig.json is correct and expected. But in editor/language-server scenarios, we should confine the search to the current workspaceFolder only.
Expected Behavior
- In language server mode, BrighterScript should not search past the active workspaceFolder boundary when locating
bsconfig.jsonfiles. - In CLI mode, upward search for parent
bsconfig.jsonfiles should continue as usual.
Additional Context
This distinction prevents cases where an unintended parent configuration is loaded in VSCode, which is confusing to users working in subfolders or opening multiple editor windows for parts of larger repositories.
Summary
Prevent BrighterScript language server from walking past workspaceFolders when searching for bsconfig.json.
Only upward search for parent configs in CLI mode.