From 9e0df6a5b4b947a1ba7ee7ef57b28c89671a5968 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 8 Sep 2018 16:16:29 -0700 Subject: [PATCH] diagnostics --- Initialization-options.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Initialization-options.md b/Initialization-options.md index 1fbf128..a6a6294 100644 --- a/Initialization-options.md +++ b/Initialization-options.md @@ -14,6 +14,20 @@ If empty, cache will be stored in memory. Additional arguments or excluded arguments for `compile_commands.json` entries. +## `diagnostics.onOpen: true` `diagnostics.onChange: true` `diagnostics.onSave: false` + +By default, diagnostics are emitted when opening a document or a change is made. +Diagnostics require parsing the document. If it is slow for you, consider: + +```javascript +{ + "diagnostics": { + "onChange": false, + "onSave": true + } +} +``` + ## `index.threads`: number of indexer threads If `index.threads` is 0, use `std::thread::hardware_concurrency()`. If you want to control peak memory usage, set it to a small integer.