Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

feat(workspace): follow imports configured in qbxlint.toml - #6

Merged
ChatDisabled merged 2 commits into
Qbox-project:mainfrom
loaf-scripts:main
Sep 30, 2026
Merged

ChatDisabled merged 2 commits into
Qbox-project:mainfrom
loaf-scripts:main

Conversation

@loaf-scripts

Copy link
Copy Markdown
Contributor

Changes

Language server support for imports in qbxlint.toml (Qbox-project/qbx-lua#6), which lists files resources run without an fxmanifest.lua entry.

  • Diagnostics: resource environments are built with qbx-lint's shared resource_imports and ResourceEnv::add_import, so the editor reports the same globals as the CLI.
  • Definitions, hover and completion reach the globals of imported files: configured imports are linked like manifest imports, with their side.
  • Glob patterns are resolved against indexed files. Paths are compared normalized, since open documents keep the path spelling the editor sent.
  • Imports are linked again when qbxlint.toml changes and when a new Lua file appears, since it may match a glob.
  • A resource outside the workspace that only imports names is indexed on the next qbx/reindex or restart, like manifest dependencies.
  • docs/protocol.md describes when import changes apply.

Depends on Qbox-project/qbx-lua#6. CI builds against qbx-lint's main, so this PR will not compile there until that PR is merged.

Checks

  • cargo fmt --check, cargo clippy --all-targets (no warnings) and cargo test pass on Windows, built against the qbx-lint branch checked out next to this repo. Not run on Linux locally.
  • New test in tests/workspace_refresh.rs covering globals by side, a resource the override does not cover, definitions reaching the imported file, and the imports going away when the config is removed.

Generated with Claude Code

@ChatDisabled
ChatDisabled merged commit 3957972 into Qbox-project:main Sep 30, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants