Skip to content

Commit

Permalink
Add multi-root workspace configuration file (#2505)
Browse files Browse the repository at this point in the history
Currently, to make LSP servers like Ruby LSP properly work for gem, like
`sentry-ruby`, we need to open `/sentry-ruby` separately. When working on
tasks across multiple gems, like `sentry-ruby` and `sentry-rails`, it requires
2 separate VS Code windows while each can not interact with each other.

For example, when using `Debug` code lens provided by Ruby LSP in `sentry-rails`'s
tests, we can put breakpoints inside `sentry-rails`'s codebase, but not in `sentry-ruby`.

But if we open the project through this new workspace configuration file,
the multi-root workspace feature in VS Code will allow us to

- Access code across multiple gems
- Debug code with VS Code across multiple gems
- Run language servers independently for each gem
  • Loading branch information
st0012 authored Jan 2, 2025
1 parent ad535cc commit bf8d8c5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ You can contribute to this project in the following ways:

And if you have any questions, please feel free to reach out on [Discord].

## Develop This Project With Multi-root Workspaces

If you use editors that support [VS Code-style multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces),
such as VS Code, Cursor...etc., opening the editor with `sentry-ruby.code-workspace` file will provide a better development experience.

## Contribute To Individual Gems

- Install the dependencies of a specific gem by running `bundle` in it's subdirectory. I.e:
Expand Down
30 changes: 30 additions & 0 deletions sentry-ruby.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"folders": [
{
"path": "sentry-ruby"
},
{
"path": "sentry-rails"
},
{
"path": "sentry-sidekiq"
},
{
"path": "sentry-delayed_job"
},
{
"path": "sentry-resque"
},
{
"path": "sentry-opentelemetry"
},
{
"path": ".github"
}
],
"extensions": {
"recommendations": [
"Shopify.ruby-lsp"
]
}
}

0 comments on commit bf8d8c5

Please sign in to comment.