fix(rubocop): don't auto-detect bundler, to avoid surprising configuration behavior #2716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My earlier PR #2706 added an on_new_config handler which auto-detects whether bundler is used in a project, and calls rubocop through bundler or not based on the result.
This had some issues:
on_new_config
handler runs twiceAfter some discussion it seems that this simpler configuration is best.
This PR deletes the
on_new_config
handler, leaving the lsp command to berubocop --lsp
.This will also match the behaviour of the solargraph and ruby_ls configurations.
Users who want to use 'bundle exec rubocop --lsp` can get this with a simple custom lsp configuration, or by using a plugin such as https://github.com/mihyaeru21/nvim-lspconfig-bundler .