diff --git a/README.md b/README.md index 4fd9ecc..4cf36d0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,20 @@ VSCode support for the [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree) gem. Available for download in the [VSCode marketplace](https://marketplace.visualstudio.com/items?itemName=ruby-syntax-tree.vscode-syntax-tree). +## Setup + +After installing the [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree) gem and the [VSCode extension](https://marketplace.visualstudio.com/items?itemName=ruby-syntax-tree.vscode-syntax-tree), add the following to your VSCode `settings.json` to format Ruby on save. + +```json +"[ruby]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "ruby-syntax-tree.vscode-syntax-tree" +}, +``` + +You can find additional config options by searching for "syntax tree" in your VSCode settings. + + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/ruby-syntax-tree/vscode-syntax-tree.