Stream: t-compiler/wg-rls-2.0

Topic: rules for opening new issues


Jane Lusby (Aug 19 2019 at 19:00, on Zulip):

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!"?

Jane Lusby (Aug 19 2019 at 19:01, on Zulip):

Should I drop into zulip first to figure out which of these things are bugs and which are missing features and open issues accordingly?

Jane Lusby (Aug 19 2019 at 19:01, on Zulip):

whats the rule yall

Daniel Mcnab (Aug 19 2019 at 19:01, on Zulip):

The latter issue is rust-analyzer#1688

Daniel Mcnab (Aug 19 2019 at 19:01, on Zulip):

'Missing snippet completions' needs further explanation

Jane Lusby (Aug 19 2019 at 19:02, on Zulip):

with rls if you start calling an associated member on a variable it will complete the member functions for that variable's type

Jane Lusby (Aug 19 2019 at 19:02, on Zulip):

if you select one it will paste in a snippet and expand it immediately

matklad (Aug 19 2019 at 19:02, on Zulip):

There are no specific rules at the moment, just opening the issue is good, but it might be good to:

Jane Lusby (Aug 19 2019 at 19:03, on Zulip):

with ra-lsp i get the same set of member completions

Daniel Mcnab (Aug 19 2019 at 19:03, on Zulip):

A picture speaks a thousand words

Jane Lusby (Aug 19 2019 at 19:03, on Zulip):

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

Jane Lusby (Aug 19 2019 at 19:03, on Zulip):

erhm

Jane Lusby (Aug 19 2019 at 19:03, on Zulip):

ill have to fiddle for a sec to get rls setup again, hold up

Jane Lusby (Aug 19 2019 at 19:07, on Zulip):

rls before hitting enter on an offered completion

Jane Lusby (Aug 19 2019 at 19:07, on Zulip):

rls after hitting enter

Jane Lusby (Aug 19 2019 at 19:07, on Zulip):

ra-lsp before

Jane Lusby (Aug 19 2019 at 19:07, on Zulip):

ra-lsp after

Jane Lusby (Aug 19 2019 at 19:08, on Zulip):

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

Jane Lusby (Aug 19 2019 at 19:09, on Zulip):

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

Jane Lusby (Aug 19 2019 at 19:10, on Zulip):

I'd be okay with rust-analyzer just providing that last jump point, but obviously I'd prefer feature parity.

Jane Lusby (Aug 19 2019 at 19:10, on Zulip):

@Daniel Mcnab

matklad (Aug 19 2019 at 19:14, on Zulip):

So, this is semi-intentional:

Daniel Mcnab (Aug 19 2019 at 19:22, on Zulip):

IntelliJ's approach is very cool. Have you got a screenshot of it in IntelliJ rust?

Jane Lusby (Aug 19 2019 at 19:45, on Zulip):

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.

Jane Lusby (Aug 19 2019 at 19:45, on Zulip):

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.

matklad (Aug 19 2019 at 19:57, on Zulip):

@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:

Jane Lusby (Aug 19 2019 at 20:06, on Zulip):

okay cool, I created an issue for it and will get to it soon :tm:

Last update: Nov 19 2019 at 17:35UTC