diff options
author | Emil Lauridsen <[email protected]> | 2019-11-18 17:02:28 +0000 |
---|---|---|
committer | Emil Lauridsen <[email protected]> | 2019-11-19 16:23:50 +0000 |
commit | dadad36bb9770f9b13ed84bc219ea0168a7a5bf1 (patch) | |
tree | 00051540da204b4294501f3c56960975177ae502 /crates/ra_lsp_server/src/world.rs | |
parent | c24ee0990486b04723534f072d7a58e829bbd1bd (diff) |
Move type inlay hint truncation to language server
This commit implements a general truncation framework for HirFormatter
that keeps track of how much has been output so far. This information
can then be used to perform truncation inside the language server,
instead of relying on the client.
Initial support is implemented for truncating types hints using the
maxInlayHintLength server config option. The existing solution in the
VSCode extension has been removed in favor of letting the server
truncate type hints.
Diffstat (limited to 'crates/ra_lsp_server/src/world.rs')
-rw-r--r-- | crates/ra_lsp_server/src/world.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index 51824e7a3..9bdea70c7 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs | |||
@@ -28,6 +28,7 @@ pub struct Options { | |||
28 | pub publish_decorations: bool, | 28 | pub publish_decorations: bool, |
29 | pub supports_location_link: bool, | 29 | pub supports_location_link: bool, |
30 | pub line_folding_only: bool, | 30 | pub line_folding_only: bool, |
31 | pub max_inlay_hint_length: Option<usize>, | ||
31 | } | 32 | } |
32 | 33 | ||
33 | /// `WorldState` is the primary mutable state of the language server | 34 | /// `WorldState` is the primary mutable state of the language server |