-
Notifications
You must be signed in to change notification settings - Fork 286
Selection formatting broken with rubocop and standardrb #434
Comments
How are those installed? Globally? Does that exact command work in a console? |
Globally, not part of the Gemfile. Notice that rufo works fine, it's installed globally as well. When I run the command in the console nothing happens. I'm not sure if using |
Looks like the 1 exit code is what's causing that. I must have broken that when doing the error handling. If you fix all the errors in a file does the formatting work? |
Yes! |
ok great. This is definitely a bug. I'll get it fixed! |
|
I'm on 0.22.2 and I still get an error about no selection formatter being defined. Am I missing a configuration option? |
@bjeanes it only works with the language server enabled |
Turning that on gets rid of the error message, but instead it just doesn't indent, silently. :| |
I can confirm that it doesn't format, both rubocop and standard. Nothing happens, no errors in the output. |
Can you post screenshots of your highlighting, logs, and config? |
Your environment
vscode-ruby
version: 0.22.0Expected behavior
When I select one or more lines in a file and execute "Format Selection" command, it should use the configured tool (rubocop or standardrb) to format selected part of the file.
FWIW - rufo does work and "Format Document" command works fine too, regardless of the formatting tool.
Actual behavior
Getting exceptions in the console like this:
rubocop:
standardb:
The text was updated successfully, but these errors were encountered: