Skip to content

Language Server: Do not walk past workspaceFolders when searching for bsconfig.json #1605

@TwitchBronBron

Description

@TwitchBronBron

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.json files.
  • In CLI mode, upward search for parent bsconfig.json files 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions