Zed editor using default rubocop settings
Opened this issue · 2 comments
When using Zed editor, the installation of standard for some reason is picking up only the default rubocop configuration:
What I believe is happening, is that bundle installs rubocop, and Zed is only using vanilla rubocop.
[edit]
As a temporary workaround I'm running standardb rules via rubocop by changing my project's .rubocop.yml
, and that seems to work
If anyone manages to get it working properly on Zed, please follow up
@LucasKuhn I didn't know you could even get Zed to display inline standardrb hints, I tried and failed, even using the workaround. Could share your Zed config please?
Did you run bundle install after adding the gems?
The inline hints come from the ruby LSP already provided by Zed, Solargraph ( https://github.com/zed-industries/zed/blob/main/docs/src/languages/ruby.md )
This is my ~/.config/zed
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
// "format_on_save": "off",
"vim_mode": false,
"ui_font_size": 16,
"buffer_font_size": 16,
"lsp": {
"solargraph": {
"initialization_options": {
"diagnostics": true,
"formatting": true
}
}
},
"language_overrides": {
"ERB": {
"formatter": {
"external": {
"command": "erb-format",
"arguments": ["--stdin", "--print-width", "120"]
}
}
}
}
}
And this is what I'm currently using on my project's .rubocob.yml
inherit_mode:
merge:
- Exclude
require:
- standard
- standard-custom
- standard-performance
- rubocop-performance
- rubocop-rails
inherit_gem:
standard: config/base.yml
standard-performance: config/base.yml
standard-custom: config/base.yml
standard-rails: config/base.yml
AllCops:
Exclude:
- "**/*.erb"
SuggestExtensions: false