-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Raw string assists #1730
Copy link
Copy link
Closed
Labels
E-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get startedgood first issue
Description
Activity
Metadata
Metadata
Assignees
Labels
E-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get startedgood first issue
Add the following assists:
"hello" -> r#"hello"#r#"hello"# -> r##"hello"##r#"hello"# -> r"hello"r"hello" -> "hello"Note that, ideally, we should apply escape/unescape for the first and last assist, but it's ok to not do it for the first pass.
Example assits are here: https://github.com/rust-analyzer/rust-analyzer/blob/e055cfacdfe3b3451484dae5d6ed08aefba133ca/crates/ra_assists/src/lib.rs
Each familiy lives in a separate mode, which contains the tests as well. See #1281 for an example of PR which adds an assist.