-
Notifications
You must be signed in to change notification settings - Fork 286
Support Rufo for formatting #295
Comments
Per discussion in #285, there are two ways to implement this:
(In both cases Personally I'd opt for (2) since I think it's good practice to utilize other extensions and minimize our own codebase. But I don't have a strong opinion. How should I proceed? |
I'll start with (2) until someone tells me otherwise. I'll work on top of #297 since this is also related to options processing. |
Any preference between |
I don't have any particular preference, other than standardizing around a common convention. |
Working on this now. I'll use Another tidbit - I believe the current implementation ALWAYS attempts to format with rubocop (regardless of settings). That was acceptable since it failed so quietly. Now that we have loud error messages, I think we should make it so that you have to opt into formatting by setting |
While experimenting with configuration options for A couple possible solutions:
@gurgeous Any thoughts? |
Well, this is interesting. Out of curiosity, I tried to set the configuration's type to Edit: Spoke too soon. Selecting |
In my PR I use this: "ruby.format": {
"type": [ "boolean", "string" ],
"enum": [ false, "rubocop" ],
"default": false,
"description": "Which system to use for formatting, or false for no formatting"
} and it correctly flags true as invalid: Seems fine, I think. Does anyone disagree? I don't feel strongly about any of these options. |
I used a similar configuration for
It flags |
Huh. Completion presents it as an option. I hadn't noticed that. That little Edit pencil thing on the left seems to use the enum (doesn't show @wingrunr21, what do you think? I really don't care either way. |
Microsoft tagged the completion item issue as a bug and added it to their backlog, so we should be okay to keep |
Great! @wingrunr21 or @rebornix - can this be merged? |
Add support for using rufo for formatting instead of Rubocop
The text was updated successfully, but these errors were encountered: