aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-25 07:01:00 +0100
committerGitHub <[email protected]>2019-10-25 07:01:00 +0100
commit518f99e16b993e3414a81181c8bad7a89e590ece (patch)
tree6239cfcafd1d0a579b4f51e4e875cc0a8e85efb4 /crates
parentc02f1165ca4099ea6c3706a670513f7904630615 (diff)
parentdc65219ae1216e747215fe937b248ebf2469f33f (diff)
Merge #2065
2065: document feature flags r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_lsp_server/src/config.rs14
1 files changed, 9 insertions, 5 deletions
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 @@
1//! FIXME: write short doc here 1//! Config used by the language server.
2//!
3//! We currently get this config from `initialize` LSP request, which is not the
4//! best way to do it, but was the simplest thing we could implement.
5//!
6//! Of particular interest is the `feature_flags` hash map: while other fields
7//! configure the server itself, feature flags are passed into analysis, and
8//! tweak things like automatic insertion of `()` in completions.
2 9
3use rustc_hash::FxHashMap; 10use rustc_hash::FxHashMap;
4 11
@@ -72,10 +79,7 @@ mod test {
72 assert_eq!(default, serde_json::from_str(r#"{}"#).unwrap()); 79 assert_eq!(default, serde_json::from_str(r#"{}"#).unwrap());
73 assert_eq!( 80 assert_eq!(
74 default, 81 default,
75 serde_json::from_str( 82 serde_json::from_str(r#"{"publishDecorations":null, "lruCapacity":null}"#).unwrap()
76 r#"{"publishDecorations":null, "showWorkspaceLoaded":null, "lruCapacity":null}"#
77 )
78 .unwrap()
79 ); 83 );
80 } 84 }
81} 85}