This Visual Studio Code extension provides formatting via
Rufo. It will be used
with files that have the “Ruby” syntax. Supports setups via RVM
ext install then search for
Before using this plugin, you must ensure that
rufo, version 0.10.0 or
higher, is installed on your system. To install
rufo, do the following:
Install Rufo by typing the
following in a terminal:
gem install rufo
If you're are using RVM or rbenv, seek
for more information below.
You can configure vscode-rufo in your workspace or user settings. You can either
a) Open VS Code settings menu, select "Extensions" and scroll down to "Rufo"
b) Manually adjust your settings via your
"rufo.exe": "rufo", // can be an absolute path
Attention: Restart Visual Studio Code after you have made changes to the settings.
If your setup instruments RVM to install Ruby version
you might receive errors indicating Rufo can't be found. Because
might not be in your current PATH, you need to change the executable
to the RVM-wrapped one:
If your setup instruments rbenv, you should
point the executable to the Rufo shim generated by rbenv. This way the extension
will continue to work after you upgrade your Ruby:
- Use Visual Studio Code to develop this extension
F5 to open a new window with the extension loaded
- Open a Ruby file or paste some Ruby code into the window
- Open the command palette by pressing (
Cmd+Shift+P on Mac)
- Choose either "Format Document" for "Format Selection".
- Find output from the extension in the debug console.
- Open the debug viewlet (
Cmd+Shift+D on Mac) and from the launch configuration dropdown pick
F5 to run the tests in a new window with your extension loaded
- See the output of the test result in the debug console
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request