From 4f94efc5ae9dabaa256f5ce7f01b3c74ab725091 Mon Sep 17 00:00:00 2001 From: Jade Date: Sat, 12 Jun 2021 04:30:12 -0700 Subject: [PATCH] Add suggested settings note for coc --- src/building/suggested.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/building/suggested.md b/src/building/suggested.md index f27793140..bb6badcd6 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: