diff options
author | Kirill Bulatov <[email protected]> | 2020-03-05 08:29:46 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-03-05 08:29:46 +0000 |
commit | e3ef17447fb2c60e3d5edd12d23478bf36ceeeb3 (patch) | |
tree | ffc755c404db3920a356e86c5c7c8741106ba727 /docs/user | |
parent | 8c07ffcd76608657dbb6c1314ab516528ba419c4 (diff) |
Better describe current inlay hints' limitations
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/features.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/user/features.md b/docs/user/features.md index 48c63ba7b..ba4d50fa8 100644 --- a/docs/user/features.md +++ b/docs/user/features.md | |||
@@ -105,9 +105,9 @@ Start `cargo watch` for live error highlighting. Will prompt to install if it's | |||
105 | 105 | ||
106 | Stop `cargo watch`. | 106 | Stop `cargo watch`. |
107 | 107 | ||
108 | #### Structural Seach and Replace | 108 | #### Structural Seach and Replace |
109 | 109 | ||
110 | Search and replace with named wildcards that will match any expression. | 110 | Search and replace with named wildcards that will match any expression. |
111 | The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`. A `$<name>:expr` placeholder in the search pattern will match any expression and `$<name>` will reference it in the replacement. Available via the command `rust-analyzer.ssr`. | 111 | The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`. A `$<name>:expr` placeholder in the search pattern will match any expression and `$<name>` will reference it in the replacement. Available via the command `rust-analyzer.ssr`. |
112 | 112 | ||
113 | ```rust | 113 | ```rust |
@@ -195,4 +195,5 @@ In VS Code, the following settings can be used to configure the inlay hints: | |||
195 | * `rust-analyzer.maxInlayHintLength` — shortens the hints if their length exceeds the value specified. If no value is specified (`null`), no shortening is applied. | 195 | * `rust-analyzer.maxInlayHintLength` — shortens the hints if their length exceeds the value specified. If no value is specified (`null`), no shortening is applied. |
196 | 196 | ||
197 | **Note:** VS Code does not have native support for inlay hints [yet](https://github.com/microsoft/vscode/issues/16221) and the hints are implemented using decorations. | 197 | **Note:** VS Code does not have native support for inlay hints [yet](https://github.com/microsoft/vscode/issues/16221) and the hints are implemented using decorations. |
198 | This approach has limitations: the caret movement near the end of the hint may look [weird](https://github.com/rust-analyzer/rust-analyzer/issues/1623). | 198 | This approach has limitations, the caret movement and bracket highlighting near the edges of the hint may be weird: |
199 | [1](https://github.com/rust-analyzer/rust-analyzer/issues/1623), [2](https://github.com/rust-analyzer/rust-analyzer/issues/3453). | ||