Skip to content

Conversation

@realfakenerd
Copy link
Contributor

Re-opening the #49 here in a new branch, i think it will be better organized this way

This commit introduces a new `Runtime` abstraction to manage execution environments for the language server and package installation.

The `Runtime` enum currently supports `Bun` (if found on the system path) and falls back to Zed's built-in `Node.js` runtime.

This change allows the extension to leverage Bun for potentially faster package management and server execution when available, while maintaining compatibility with the standard Node.js environment.

The following changes were made:
- Add `src/runtime.rs` defining the `Runtime` enum and its methods (`new`, `server_command`, `install_package`, `latest_package_version`, `installed_package_version`).
- Update `Cargo.toml` to include `serde` and `which` dependencies.
- Refactor `src/svelte.rs` to use the new `Runtime` for package installation checks, version lookups, and starting the language server process.
@cla-bot cla-bot bot added the cla-signed label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant