From dc65219ae1216e747215fe937b248ebf2469f33f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 25 Oct 2019 09:00:30 +0300 Subject: document feature flags --- crates/ra_lsp_server/src/config.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'crates/ra_lsp_server/src/config.rs') diff --git a/crates/ra_lsp_server/src/config.rs b/crates/ra_lsp_server/src/config.rs index 579d4c692..9871a3b37 100644 --- a/crates/ra_lsp_server/src/config.rs +++ b/crates/ra_lsp_server/src/config.rs @@ -1,4 +1,11 @@ -//! FIXME: write short doc here +//! Config used by the language server. +//! +//! We currently get this config from `initialize` LSP request, which is not the +//! best way to do it, but was the simplest thing we could implement. +//! +//! Of particular interest is the `feature_flags` hash map: while other fields +//! configure the server itself, feature flags are passed into analysis, and +//! tweak things like automatic insertion of `()` in completions. use rustc_hash::FxHashMap; @@ -72,10 +79,7 @@ mod test { assert_eq!(default, serde_json::from_str(r#"{}"#).unwrap()); assert_eq!( default, - serde_json::from_str( - r#"{"publishDecorations":null, "showWorkspaceLoaded":null, "lruCapacity":null}"# - ) - .unwrap() + serde_json::from_str(r#"{"publishDecorations":null, "lruCapacity":null}"#).unwrap() ); } } -- cgit v1.2.3