rust-analyzer/crates/ide-completion/src
bors f3e9b38e26 Auto merge of #12646 - lowr:fix/11897, r=lowr
fix: escape receiver texts in completion

This PR fixes #11897 by escaping '\\' and '$' in the text of the receiver position expression. See [here](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax) for the specification of the snippet syntax (especially [this section](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#grammar) discusses escaping).

Although not all occurrences of '\\' and '$' have to be replaced, I chose to replace all as that's simpler and easier to understand. There *are* more clever ways to implement it, but I thought they were premature optimization for the time being (maybe I should put FIXME notes?).
2022-07-20 10:51:31 +00:00
..
completions Auto merge of #12646 - lowr:fix/11897, r=lowr 2022-07-20 10:51:31 +00:00
context fix: Improve self param completion applicability 2022-07-16 12:28:41 +02:00
render fix: Improve self param completion applicability 2022-07-16 12:28:41 +02:00
tests Auto merge of #12773 - Veykril:self-compl, r=Veykril 2022-07-16 10:28:52 +00:00
completions.rs fix: Don't show qualified path completions for private items 2022-07-15 13:30:43 +02:00
config.rs fix: Fix fill-arguments completions not working 2022-05-13 19:52:44 +02:00
context.rs Auto merge of #12773 - Veykril:self-compl, r=Veykril 2022-07-16 10:28:52 +00:00
item.rs fix: Fix auto-ref completions inserting into wrong locations 2022-06-20 18:59:57 +02:00
lib.rs internal: Simplify some completions 2022-06-20 21:55:33 +02:00
render.rs Find original as node before compute ref match 2022-07-18 23:24:19 +08:00
snippet.rs Auto merge of #12646 - lowr:fix/11897, r=lowr 2022-07-20 10:51:31 +00:00
tests.rs disable private editable in TEST_CONFIG by default 2022-06-16 08:52:57 +08:00