Stream: t-compiler/wg-rls-2.0

Topic: appreciation


Avery Harnish (Nov 04 2019 at 21:31, on Zulip):

Just stumbled across rust-analyzer and WOW! Blazing fast!! This is going to make my life so much better when developing Rust, thanks so much to everybody working on this :)

matklad (Nov 13 2019 at 07:45, on Zulip):

I must say, I am myself amazed at how far have we gone already. Certain things start to feel so natural, that I am forgetting all the complex machinery that powers the features :) Just now, I've mindlessly fixed a bug with a nested option because I've noticed a type hint:

https://youtu.be/OlHZPglOtuQ

The way the hint changes when you add/remove ? feels magical to me :)

Jeremy Kolb (Nov 13 2019 at 13:06, on Zulip):

Maybe we should put together a video of all the cool features in ra

Jeremy Kolb (Nov 13 2019 at 13:08, on Zulip):

I used to watch those live crate videos on youtube when I first got into rust... it would be cool to do something like that using rust-analyzer

matklad (Nov 13 2019 at 13:09, on Zulip):

/me (looking up from 1.5k word unfinished blog-post about find usages): "that would be cool"

Laurențiu Nicola (Nov 13 2019 at 15:12, on Zulip):

I think it's an older feature, but I only recently found out about the semicolon insertion. I was scrolling around some large if to add a semicolon at the end, and it was already there. I thought I must have added it myself, then forgot about it.

matklad (Nov 13 2019 at 15:24, on Zulip):

That, in fact, was on of the very first features implemented :)

Paul Faria (Nov 13 2019 at 18:28, on Zulip):

Just used it for the first time yesterday, and I was really impressed!

Santiago Pastorino (Nov 14 2019 at 13:40, on Zulip):

I must say, I am myself amazed at how far have we gone already. Certain things start to feel so natural, that I am forgetting all the complex machinery that powers the features :) Just now, I've mindlessly fixed a bug with a nested option because I've noticed a type hint:

https://youtu.be/OlHZPglOtuQ

The way the hint changes when you add/remove ? feels magical to me :)

very cool

Edwin Cheng (Nov 15 2019 at 03:22, on Zulip):

Oh, I found that RA works in some rustc source code now!. The goto-definition is a godsend for reading rustc source code.

mark-i-m (Nov 21 2019 at 00:51, on Zulip):

I've been using ra for a while now with vim. I mostly tend to use it for completion, and it has been getting steadily better. Kudos to all! This is already a major improvement over the previous state

mark-i-m (Jan 16 2020 at 03:59, on Zulip):

I'm just coming back to this thread again to say how impressive it is that ra works on rustc and I can do things getting documentation, going to definition, finding references, etc on that huge code base

matklad (Jan 16 2020 at 10:25, on Zulip):

rustc is peanuts. warp or lib p2p on the other hand.... :D

matklad (Jan 16 2020 at 10:25, on Zulip):

btw, we recently landed a nice perf improvement for larger files: https://github.com/rust-analyzer/rust-analyzer/pull/2837

Edwin Cheng (Feb 18 2020 at 08:15, on Zulip):

Oh, I just tested the new ra_lsp_server analysis-stats command in RA source code, and found that we have only 6% (4%+2%) unknown types:

Total expressions: 134949
Expressions of unknown type: 5410 (4%)
Expressions of partially unknown type: 3830 (2%)
Type mismatches: 272

And here is the analysis-stats output from Feb 2019:

Total expressions: 49160
Expressions of unknown type: 8156 (16%)
Expressions of partially unknown type: 2432 (4%)

What a big improvement ! :tada:

Laurențiu Nicola (Feb 18 2020 at 08:42, on Zulip):

We're also 2.75x larger (total expressions)

Florian Diebold (Feb 18 2020 at 08:55, on Zulip):

We're also 2.75x larger (total expressions)

probably a big part of that comes from macro expansions that we can handle now and couldn't last year

matklad (Feb 18 2020 at 15:14, on Zulip):

Hey, rust-analyzer is in trending vs code extensions: https://marketplace.visualstudio.com/vscode

std::Veetaha (Feb 18 2020 at 15:17, on Zulip):

Wow, even without a home page...

Jeremy Kolb (Feb 18 2020 at 15:23, on Zulip):

That is awesome

matklad (Feb 18 2020 at 15:28, on Zulip):

also, 666 followers on twitter :smiling_devil:

std::Veetaha (Feb 18 2020 at 15:39, on Zulip):

Don't forget to ask your relatives and friends to put 5 stars on the marketplace!

matklad (Feb 18 2020 at 16:45, on Zulip):

Finally, I don't need to be reminded that syntax is a private field, thanks @Kirill Bulatov !

pasted image

matklad (Feb 19 2020 at 18:11, on Zulip):

Actually, I think this is my first time coding in Rust with auto import (IntelliJ folks impled this just after I've left :) ), and the experience is really transformative.

Kirill Bulatov (Feb 19 2020 at 20:22, on Zulip):

I would like to enhance it further, but need guidance.
So after the maintenance week is over, let's go through the options.

matklad (Mar 04 2020 at 10:33, on Zulip):

I am amazed by how things now just work with macros

goto-macros.gif

This jumps from macro to macro! Amazing work @Edwin Cheng !

mark-i-m (Mar 05 2020 at 01:04, on Zulip):

Btw, this is a bit of meta note, but really love the fact that this thread exists at all, and I'm wondering if there are opportunities to do similar things in other corners of the rust community? What if there was a big "this awesome thing just happened" thread where people from any part of the community can post about cool accomplishments?

Laurențiu Nicola (Mar 18 2020 at 18:18, on Zulip):

I know this isn't news, but I haven't written much code lately and I just realized that rust-analyzer is starting to feel really polished now, with decent completion, go to definition and auto-import and related quick fixes.

matklad (Mar 18 2020 at 18:21, on Zulip):

Yup. Also, ssr rocks!

matklad (Mar 18 2020 at 18:21, on Zulip):

Just converted a bunch of functions to methods with it

matklad (Mar 18 2020 at 18:22, on Zulip):

And this means that we can improve rust-analyzer itself faster ^^

std::Veetaha (Mar 18 2020 at 18:37, on Zulip):

Semantic highlighting is what rocks for me!

Laurențiu Nicola (Mar 18 2020 at 18:39, on Zulip):

I tried it once, but it's too much of a hassle to use Insiders with that parameter :pensive:.

std::Veetaha (Mar 18 2020 at 18:46, on Zulip):

I added this to .bashrc

 alias code="code-insiders --enable-proposed-api matklad.rust-analyzer"

Besides that migrated from code to code-insiders with the sync extension, but there is some experimental work going on to add this feature to vscode from scratch.

The most annoying thing still is that I cannot start vscode by clicking the ui icon. I always need Ctrl+Shift+T -> code to do this.

Laurențiu Nicola (Mar 18 2020 at 18:47, on Zulip):

I think you can make a copy of the Code .desktop file and add that

std::Veetaha (Mar 18 2020 at 18:57, on Zulip):

Hmm, yeah, that was not too annoying for me to spend another 5 minutes to setup that .desktop file now)

Edwin Cheng (Mar 21 2020 at 11:41, on Zulip):

It might be off topic to this thread, but I just found out our fake token used in Completion is intellijRulezz :happy:

Edwin Cheng (Mar 21 2020 at 11:42, on Zulip):

First easter egg I found in this project !

matklad (Mar 21 2020 at 11:51, on Zulip):

That's the secret sauce that makes completion especially delicious: https://github.com/JetBrains/intellij-community/blob/79e97242d9b7c52a1cb66e8a2f2343b91d47347f/platform/core-api/src/com/intellij/codeInsight/completion/CompletionUtilCore.java#L27

Edwin Cheng (Mar 21 2020 at 11:57, on Zulip):

We should submit a PR to racer to make it to the Standard for rust IDE !

Kirill Bulatov (Mar 30 2020 at 12:57, on Zulip):

Just wanted to throw in my 5¢ and appreciate people doing the code reviews in the project.
Thank you for helping to move everything forward.

matklad (May 19 2020 at 21:18, on Zulip):

This was a WOW moment for me right now:

image.png

Florian Diebold (May 19 2020 at 21:33, on Zulip):

not the double macro completions though :thinking:

matklad (May 19 2020 at 21:35, on Zulip):

Lol yes. I looked into fixing that once, but I don't remember why I didn't... I think the issue is that we don't handle shadowing in process_names_in_scope

Florian Diebold (May 19 2020 at 21:36, on Zulip):

yeah, we also give double completions if you shadow local variables, I think

matklad (May 19 2020 at 21:36, on Zulip):

And it's something along the lines of "macros are available both as "lexical" macro-exported macros, as an items imported via prelude"

Last update: May 24 2020 at 22:55UTC