From 2544abbf867a7660bc2c9342181c8392774f1cca Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 2 Dec 2020 17:31:24 +0300 Subject: Make config.rs a single source of truth for configuration. Configuration is editor-independent. For this reason, we pick JSON-schema as the repr of the source of truth. We do specify it using rust-macros and some quick&dirty hackery though. The idea for syncing truth with package.json is to just do that manually, but there's a test to check that they are actually synced. There's CLI to print config's json schema: $ rust-analyzer --print-config-schema We go with a CLI rather than LSP request/response to make it easier to incorporate the thing into extension's static config. This is roughtly how we put the thing in package.json. --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 1101770e7..c6994127b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1550,6 +1550,7 @@ version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" dependencies = [ + "indexmap", "itoa", "ryu", "serde", -- cgit v1.2.3