You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it's possible to specify includePatterns and excludePatterns for rubyLsp.indexing, those values are concatenated to the default values for those settings. That makes it impossible to configure ruby-lsp to index RSpec support files.
For example, RSpec will add spec to $LOAD_PATH, so we can add some support file to spec/my_helper_module.rb, for example, and include that module in a context. Here's an example on how it works:
Description
Ruby LSP Information
VS Code Version
1.95.0
Ruby LSP Extension Version
0.8.12
Ruby LSP Server Version
0.21.3
Ruby LSP Addons
Ruby Version
3.1.6
Ruby Version Manager
rbenv
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
Reproduction steps
While it's possible to specify
includePatterns
andexcludePatterns
forrubyLsp.indexing
, those values are concatenated to the default values for those settings. That makes it impossible to configureruby-lsp
to index RSpec support files.For example, RSpec will add
spec
to$LOAD_PATH
, so we can add some support file tospec/my_helper_module.rb
, for example, and include that module in a context. Here's an example on how it works:In the example above,
LoggedInAsAdmin
is not going to be indexed, so we can't jump to its definition from VSCode.Currently, it's not possible to override the exclusion pattern "spec/**/*" defined by default, from VSCode settings.
We should be allowed to override those exclusions in order to enable indexing of RSpec support files.
The text was updated successfully, but these errors were encountered: