Stream: t-compiler/rust-analyzer

Topic: SSR in comments


Maik Klein (May 10 2021 at 11:19, on Zulip):
// Place the cursor on the line below to see the assist đź’ˇ.
// foo($a, $b) ==>> ($a).foo($b)

The docs say I can put ssr in the comments, but I don't get any assist here.
Neither in vim with coc nor vscode. Is this still supported. Do I need to enable it somewhere?

Florian Diebold (May 10 2021 at 11:22, on Zulip):

it's supported, but if the SSR query doesn't work for some reason, it'll just not show the assist without explanation. In VSCode you can also use the SSR command, and I think it will give you at least an error message? I hope

Florian Diebold (May 10 2021 at 11:22, on Zulip):

it would be cool if we could show a diagnostic for a comment-SSR query

Maik Klein (May 10 2021 at 11:23, on Zulip):

ah that might be it. I'll try with something that should work

Maik Klein (May 10 2021 at 11:35, on Zulip):

Okay this is more difficult than I thought :D. Are there more docs with examples for SSR?

Maik Klein (May 10 2021 at 11:37, on Zulip):

besides this I mean https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_ssr/src/lib.rs#L6 ?

Laurențiu (May 10 2021 at 12:10, on Zulip):

Maybe try https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_ssr/src/tests.rs

Maik Klein (May 10 2021 at 12:11, on Zulip):

Also yes the hints work if the SSR query is valid

Last update: Jul 26 2021 at 13:45UTC