From 18493f62b05b1a6331aef858f2b20f20ef79a875 Mon Sep 17 00:00:00 2001 From: Jade Date: Sat, 12 Jun 2021 09:17:06 -0700 Subject: [PATCH] Add suggested settings note for coc (#1144) --- src/building/suggested.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/building/suggested.md b/src/building/suggested.md index f2779314..bb6badcd 100644 --- a/src/building/suggested.md +++ b/src/building/suggested.md @@ -43,6 +43,11 @@ you can write: in your `.vscode/settings.json` file. This will ask `rust-analyzer` to use `x.py check` to check the sources, and the stage 0 rustfmt to format them. +If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a +`.vim/coc-settings.json` and enter the same settings as above, but replacing +`editor.formatOnSave: true,` with +`"coc.preferences.formatOnSaveFiletypes": ["rust"],`. + If running `x.py check` on save is inconvenient, in VS Code you can use a [Build Task] instead: