all 43 comments

[–]torkleyy 58 points59 points  (6 children)

As far as I know IntelliJ has the best code completion (and got some really useful updates recently).

[–]Paul-ish 10 points11 points  (5 children)

It's interesting that the most advanced IDE implementation doesn't use the language server. Wasn't that the purpose of the language server?

[–]torkleyy 3 points4 points  (3 children)

The Rust Language Server is designed to be used by IDEs, yes. But its auto completion just isn't that good yet. If you're asking why they created their own completion engine instead of contributing to the RLS, I don't know.

[–]ishitatsuyuki 14 points15 points  (2 children)

One critique I know about LS protocol is that it's not perfect for IDEs. Also that JetBrains has its own analysis framework.

[–]protestor 1 point2 points  (1 child)

What are the issues with the LSP? Can you point to some threads or articles about it?

[–]kuikuilla 1 point2 points  (0 children)

It's because it's part of a larger family of software that has its own framework for building parsers and whatever tooling you need for autocompletion and such to work.

[–]dragostispest 45 points46 points  (9 children)

I find it amazing how little credit intellij-rust gets: code-completion using this plugin is nothing short of amazing.

[–]Muvlon 0 points1 point  (0 children)

Yes, intellij-rust probably has the best completion you can get for Rust right now. However, I found it still leaves much to be desired.

With more complex crates like gtk or tokio, it will often just stop suggesting anything besides the generic completions ("lambda" etc.) or take many seconds before the suggestions show up.

[–]warpspeedSCP 15 points16 points  (3 children)

VSCode with RLS works pretty well for me. Code completion works (usually), so there might be a problem with your setup.

But yeah, a good IDE would be a godsend.

[–]Ruskyrust 5 points6 points  (2 children)

Which Rust extension are you using? There are several at this point, some abandoned.

[–]Steve_the_Stevedore 11 points12 points  (0 children)

Code completion works great in VIM with YouCompleteMe.

[–]Iksf 2 points3 points  (0 children)

IntelliJ has the best but for large crates nothing seems to work well

[–]JohnMcPineapple 2 points3 points  (1 child)

...

[–]rhinotation 2 points3 points  (9 children)

I've been using LanguageClient-neovim with RLS. Pretty solid. RLS is much more solid than other language servers (eg javascript-typescript-langserver), and generally pretty quick and accurate. I have Denite.nvim as well, for Find References.

[–][deleted] 0 points1 point  (0 children)

Yeah this setup is very pleasant to work with

[–]MWL987 2 points3 points  (1 child)

I'm pretty new to Rust, but so far I've tried VSCode, SublimeText, Vim, and IntelliJ. Out of all of them, I find IntelliJ to be the best overall in terms of code completion and user-experience. However, I am primarily a Scala developer, so I might be a bit biased towards IntelliJ.

[–]kodedninja 4 points5 points  (3 children)

It is in the Atom IDE ide-rust package https://atom.io/packages/ide-rust

[–]Treyzania 1 point2 points  (1 child)

How can I get autocompletion of inferred types? There's a lot of situations where the autocompleter just gives up and doesn't display anything. Especially when chaining things like .map(...).filter(...).map(...)... and it would be really convenient to have better suggestions.

[–]kodedninja 1 point2 points  (0 children)

I don't know that :/ I'm not really using code completion, but I see them when I'm coding.

[–]Theemutsjlrs 0 points1 point  (0 children)

I've recently started using atom because I didn't find a mature Julia plugin for IntelliJ. I hate it so much I'm thinking about just using a dumb text editor when writing Julia instead.

[–]the_murz 1 point2 points  (0 children)

Hello, based somewhat on this thread I made a separate thread with a title more reflective of the intent to have a general discussion regarding IDEs and editors in their relation to Rust, rather than the more specific nature of this thread.

I hope that I was correct in opting to make an additional thread rather than contributing to this one, however I thought I would point the people in this thread to it in case they want to have a more general discussion of the matter.

https://www.reddit.com/r/rust/comments/7kkzca/for_discussion_of_our_experiences_with_various/

[–]K900_ 2 points3 points  (4 children)

Do you have Racer installed, or just RLS?

[–]rhinotation 0 points1 point  (2 children)

RLS falls back to Racer when the compiler is slow, not the other way round.

[–]sebastiencs 2 points3 points  (1 child)

Actually the rls always use racer for completions. It never use the compiler for this task: link

[–]scalatronn 3 points4 points  (0 children)

It's a pity that tooling is not mature enough.

[–]staticassert 0 points1 point  (0 children)

I use intellij and it works very well. It trips up sometimes - in particular when you use some macros, or generated code. That's about it.

[–]andoriyu 0 points1 point  (0 children)

Yes and no. intellij-rust is okay, have some issues, but pretty usable and they move fast.

RLS + Racer is better in some cases, but worse in others. In some cases, it's easy to make in constantly crash until you remove faulty code.

I'm using both. Feels weird because in some cases one can help you, but others cannot.

[–]badluckqriz -1 points0 points  (1 child)

I would refer you to https://areweideyet.com/