Skip to content

Implement Component and LanguageServer traits#271

Open
tartarughina wants to merge 1 commit into
zed-extensions:mainfrom
tartarughina:multi-lsp
Open

Implement Component and LanguageServer traits#271
tartarughina wants to merge 1 commit into
zed-extensions:mainfrom
tartarughina:multi-lsp

Conversation

@tartarughina

Copy link
Copy Markdown
Collaborator
  • Prepare the extension to offer multiple LSPs
  • Standardize retrieval and download of components
  • Simplify debugger interaction with jdtls

- Prepare the extension to offer multiple LSPs
- Standardize retrieval and download of components
- Simplify debugger interaction with jdtls
@tartarughina tartarughina requested a review from playdohface June 13, 2026 20:31
@cla-bot cla-bot Bot added the cla-signed label Jun 13, 2026
@tartarughina

Copy link
Copy Markdown
Collaborator Author

This refactor is the first step to vend multiple LSPs, following the pattern used in the Ruby extension.

Alongside it, I created the Component trait to standardize as much as possible the functions to call when downloading and retrieving bundles or components.

I finally simplified the Debugger by removing the overkill LspWrapper struct to save the current workspace.

To verify that nothing broke I had next to each other two Java projects and I was able to debug without issue, asserting no regression was caused by the removal of the Arc<RwLock<>>.

@playdohface playdohface left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did my usual round of testing and nothing broke 👍

Comment thread src/component.rs

use crate::util::should_use_local_or_download;

pub trait Component {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan of the name of this trait, Component could mean anything and is rather likely to conflict in future. Downloadable or DownloadedComponent would be some suggestions that are less generic.

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.

2 participants