From 955a89ae27c012124ed10eaea632ee90efd530df Mon Sep 17 00:00:00 2001 From: Ryan Bates Date: Tue, 4 Apr 2023 12:10:50 -0700 Subject: [PATCH] Add Setup section to README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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.