All the UI is doing is automatically making it a markdown link. You can do it yourself just by doing [!test_community@sopuli.xyz](https://sopuli.xyz/c/test_community)
Here it looks like the link is added when you make the comment, and the it is added directly to the formatting. I'm guessing you're using an app or some other client to access Lemmy? On reddit, it just recognises the "/r/" and places the link on the front end.