-
Notifications
You must be signed in to change notification settings - Fork 28
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
Only display code lens when the test framework is rails #318
Conversation
Currently, ruby-lsp-rails also sends code lens even when the test library is not rails. This creates problem when the user has both ruby-lsp-rspec and ruby-lsp-rails installed and the test framework is rspec, as the duplicated code lens will be cause none of them to display.
@@ -47,6 +47,8 @@ def deactivate | |||
).void | |||
end | |||
def create_code_lens_listener(response_builder, uri, dispatcher) | |||
return unless T.must(@global_state).test_library == "rails" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to skip the entire listener because it's only used for test code lends atm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably fine for now, but we'll need to re-think for @gmcgibbon's work in #239
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be worth creating a separate listener for that feature now that we have conditions like this.
We still need to improve the test framework detection logic in the Ruby LSP to fully fix the Ruby LSP RSpec issue though, right? |
@vinistock Yeah that's true. I'm working on it now. |
Currently, ruby-lsp-rails also sends code lens even when the test library is not rails. This creates problem when the user has both ruby-lsp-rspec and ruby-lsp-rails installed and the test framework is rspec, as the duplicated code lens will be cause none of them to display.
I also removed obsolete test setups that create/remove message queues manually. They're not used after the
with_server
is adopted.