I'm trying out rust-analyzer a bit and running into various feature regressions from RLS. This feels normal because presumably ra-lsp is too young to have reached feature parity. Should I still open issues for problems I run into, like missing snippet completion feature or inability to jump to docs from certain elements like "assert_eq!"?
Should I drop into zulip first to figure out which of these things are bugs and which are missing features and open issues accordingly?
whats the rule yall
The latter issue is rust-analyzer#1688
'Missing snippet completions' needs further explanation
with rls if you start calling an associated member on a variable it will complete the member functions for that variable's type
if you select one it will paste in a snippet and expand it immediately
There are no specific rules at the moment, just opening the issue is good, but it might be good to:
with ra-lsp i get the same set of member completions
A picture speaks a thousand words
but selecting one just pastes the name and a pair of parens, with the cursor in the middle of them (which is super annoying because I've never used plugins that insert a matching paren or quote or w/e
ill have to fiddle for a sec to get rls setup again, hold up
the after for rls is an expanded snippet definition with the default text for the various args being the args name and type in the definition
if you start typing it immediately replaces that selected text with what you're typing, if you hit jump to next point of snippet it will select the next arg for replacement. Once you replace all args a last jump will take the cursor out of the surrounding parens and place it after the closing paren
I'd be okay with rust-analyzer just providing that last jump point, but obviously I'd prefer feature parity.
So, this is semi-intentional:
()and placing cursor inside (if there are arguments) or outside (if the fn takes zero args) is a feature
IntelliJ's approach is very cool. Have you got a screenshot of it in IntelliJ rust?
Just inserting the parens with the cursor in the middle is super jarring for me personally because I've never used or liked those plugins that manage the matching parens/quotes/w.e, so when I suddenly have an extra character after the cursor while in insert mode that I didn't plan on its disruptive and necessitates extra mode changes or usage of arrow keys that I'd prefer to avoid. The snippets avoid this by giving that last jump to after the closing paren while staying in insert mode, but if theres no snippet integration I'd rather not have the parens inserted at all or just the open paren personally.
that said I was already interested in getting involved with ra-lsp, so I'd be happy to figure out how to copy this feature from rls and add it to ra-lsp and help with any feature flagging.
@Jane Lusby cool! SO I think I can't give a super-thorogh mentoring instructions right now, but (besides dec docs in the repo) what you want to look at are:
okay cool, I created an issue for it and will get to it soon :tm: