Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Add Dependencies editor view #1018

Merged
merged 5 commits into from
Feb 9, 2024
Merged

Add Dependencies editor view #1018

merged 5 commits into from
Feb 9, 2024

Conversation

paracycle
Copy link
Member

Motivation

This PR adds a DEPENDENCIES view to the Editor sidebar, which shows the gem dependencies (including transitive ones) of a Ruby project and allows users to browse the contents of those dependencies without leaving their current editor.

image

Implementation

Most of the implementation is centred around the dependenciesTree.ts file which declares a TreeDataProvider class with nested TreeItem types under it. The DependenciesTree class watches for changes in workspace, and when a new workspace is loaded, it makes the rubyLsp/workspace/dependencies LSP request to the server. Using the response, builds the appropriate dependency tree.

Automated Tests

No tests yet.

Manual Tests

Open the current branch against Ruby LSP that includes changes in Shopify/ruby-lsp#1346 and you should be able to see a DEPENDENCIES view in the Editor sidebar.

src/rubyLsp.ts Outdated Show resolved Hide resolved
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

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

🚀

@vinistock vinistock merged commit 91e3134 into main Feb 9, 2024
10 checks passed
@vinistock vinistock deleted the uk-vs-bundler-view branch February 9, 2024 19:50
@vinistock vinistock added the enhancement New feature or request label Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants