diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-01 01:01:40 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-01 01:01:40 +0100 |
commit | 25201b2dad7b4b0d41494e238ebf643ad7ad8cd6 (patch) | |
tree | 2bbae38389baa7f81726db37f99e7e6b62f1f28a /crates/ide/src | |
parent | 3dbd8b5e7cfabbb157f58d7dabf2daf945904e02 (diff) | |
parent | 7bea1d8bfe0aa70673648e5fc93fe6c0fcd69150 (diff) |
Merge #8274
8274: Adding a few more gifs and screenshots for features in manual r=Veykril a=MozarellaMan
Related #8267,#6539. Gifs are [here](https://github.com/rust-analyzer/rust-analyzer/issues/6539#issuecomment-809574840)
Finishing up the last PR, for the last two features that didn't have a visual example.
For syntax highlighting, I wasn't able to find a theme that displayed the difference between an enum and struct, but I only tried a few apart from the default so there could be one out there!
e.g., with the default light theme, `Ord` and `Ordering` in `use std::cmp::{Ord, Ordering}` had the same highlight colour. So I just went with displaying `mut` items being underlined.
Co-authored-by: Ayomide Bamidele <[email protected]>
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 3 | ||||
-rw-r--r-- | crates/ide/src/typing.rs | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 67a10766b..9df8d21af 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -48,6 +48,9 @@ pub struct HlRange { | |||
48 | // | 48 | // |
49 | // The general rule is that a reference to an entity gets colored the same way as the entity itself. | 49 | // The general rule is that a reference to an entity gets colored the same way as the entity itself. |
50 | // We also give special modifier for `mut` and `&mut` local variables. | 50 | // We also give special modifier for `mut` and `&mut` local variables. |
51 | // | ||
52 | // image::https://user-images.githubusercontent.com/48062697/113164457-06cfb980-9239-11eb-819b-0f93e646acf8.png[] | ||
53 | // image::https://user-images.githubusercontent.com/48062697/113187625-f7f50100-9250-11eb-825e-91c58f236071.png[] | ||
51 | pub(crate) fn highlight( | 54 | pub(crate) fn highlight( |
52 | db: &RootDatabase, | 55 | db: &RootDatabase, |
53 | file_id: FileId, | 56 | file_id: FileId, |
diff --git a/crates/ide/src/typing.rs b/crates/ide/src/typing.rs index e10b7d98e..11408d445 100644 --- a/crates/ide/src/typing.rs +++ b/crates/ide/src/typing.rs | |||
@@ -49,6 +49,9 @@ pub(crate) const TRIGGER_CHARS: &str = ".=>"; | |||
49 | // ---- | 49 | // ---- |
50 | // "editor.formatOnType": true, | 50 | // "editor.formatOnType": true, |
51 | // ---- | 51 | // ---- |
52 | // | ||
53 | // image::https://user-images.githubusercontent.com/48062697/113166163-69758500-923a-11eb-81ee-eb33ec380399.gif[] | ||
54 | // image::https://user-images.githubusercontent.com/48062697/113171066-105c2000-923f-11eb-87ab-f4a263346567.gif[] | ||
52 | pub(crate) fn on_char_typed( | 55 | pub(crate) fn on_char_typed( |
53 | db: &RootDatabase, | 56 | db: &RootDatabase, |
54 | position: FilePosition, | 57 | position: FilePosition, |