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

WIP: Use index to detect test library #3031

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented Jan 9, 2025

Closes #1334

Co-authored with @st0012

TODO:

  • consider ruby-lsp-rspec
  • consider ruby-lsp-rails
  • do we still need unknown vs none?

@response_builder = T.let(
ResponseBuilders::CollectionResponseBuilder[Interface::CodeLens].new,
ResponseBuilders::CollectionResponseBuilder[Interface::CodeLens],
)
super()
Listeners::CodeLens.new(@response_builder, global_state, uri, dispatcher)
Listeners::CodeLens.new(@response_builder, test_library, uri, dispatcher)

Addon.addons.each do |addon|
addon.create_code_lens_listener(@response_builder, uri, dispatcher)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@st0012 @vinistock I'm wondering how we should update this since currently ruby-lsp-rails checks @global_state.test_library == "rails". What if we make test_library be an optional keyword argument? That would prevent breaking the API for other addons.

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

Successfully merging this pull request may close these issues.

Use ancestors to determine test framework in code lens
1 participant