diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_lsp_server/src/config.rs | 14 |
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 | ||
3 | use rustc_hash::FxHashMap; | 10 | use 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 | } |