Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for code lens to the ruby-lsp #59

Closed
vinistock opened this issue Mar 29, 2022 · 3 comments
Closed

Add support for code lens to the ruby-lsp #59

vinistock opened this issue Mar 29, 2022 · 3 comments

Comments

@vinistock
Copy link
Member

vinistock commented Mar 29, 2022

The code lens request allows us to attach a command to a piece of code. The main use case we want to support is running and debugging tests. We can add two commands to each discovered test (run | debug).

Additionally, we can populate VS Code's test interface using the same request. By using a middleware, we can retrieve test cases discovered, populate the test interface and provide similar options to run or debug examples.

Documentation: https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens

@vinistock vinistock transferred this issue from another repository Apr 8, 2022
@vinistock vinistock mentioned this issue Jul 15, 2022
@st0012
Copy link
Member

st0012 commented Mar 6, 2023

Is it possible to borrow some concepts or implementations from Andy's hackday project for a quick spike?

My impression is that either using VS Code's test interface or the code lens request, the logic underneath should be pretty similar (e.g. compute test location and command). And based on that, we can get a better idea on how we can integrate debug into this, either on the server or client side.

@andyw8 @vinistock WDYT?

@vinistock
Copy link
Member Author

It should be possible to borrow the code lens implementation to try it out.

In terms of the debug integration, it should just be a matter of writing a VS Code command that launches that test with the debugger. Given that RDBG exports a Task already, it should be straight forward.

@vinistock
Copy link
Member Author

Closed in favour of more specific issues #1554, #584.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants