Implement Component and LanguageServer traits#271
Conversation
tartarughina
commented
Jun 13, 2026
- 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
|
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
left a comment
There was a problem hiding this comment.
I did my usual round of testing and nothing broke 👍
|
|
||
| use crate::util::should_use_local_or_download; | ||
|
|
||
| pub trait Component { |
There was a problem hiding this comment.
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.