Announcing Rust Language Server Alpha Release
jonathanturner.org
jonathanturner.org
I'm also fascinated to hear that it's using both Racer and rustc to provide autocomplete. Is there any long-term plan to provide "quick and dirty" info from the compiler itself rather than from Racer? EDIT 2: Ah, the final paragraph addresses this. That's what I get for commenting before I'm done reading. :P
https://github.com/sourcegraph/emacs-lsp
(linked from the langserver page)
Better yet, we can have language designers implement support themselves, ideally using the same code that powers their compiler. Historically, tooling support has been the single biggest stumbling block for new languages, no matter how promising. This should significantly reduce the barrier to entry for that, and make new languages more viable as a result.
The fact that it can also be used to "light up" hardcore editors like Vim and Emacs is also a nice bonus!
This. Common protocols is what has helped us independently, incrementally and exponentially make the internet more useful.
If we can (finally?) get this lesson learned down to the application level, computing may finally start advancing conceptually once again.
Right now we've been in a rinse/repeat standstill iteration for god knows how many years.
But I guess everyone is too busy trying to get rich building the next big closed service to consider fundamental issues like that...
YouCompleteMe for vim, although it relies on python so may not be portable. I took a quick stab at building one in pure vimscript and a process in vim 8 and it seemed very doable.
It already works asynchronously in neovim and vim on windows, mac and linux. You can follow up with the discussion at https://github.com/neovim/neovim/issues/5522 (you can see some of the progress in thread in gifs)
Another example is when you want to share code between projects without a seperate dll, like with a client/server model. Easy enough to do with make et al but not with a language server.
Neither problem is insurmountable though.
rust's powerful macros are an exception to this, I guess.
Would have been much better if you could tell it the dependencies instead of having to use yet another make clone (and a bad one at that) though.
It's not intended to be used like make, with lots of shell scripts in a Makefile.
Instead, you write all the actual build code for a given task once, and package it in a Rust crate, which can then be pulled as a build-time dependency.
So, for example, there's a cmake crate (https://docs.rs/cmake/0.1.20/cmake/) that handles any project using cmake. If you just have one of two glue files written in C, you use the gcc crate (http://alexcrichton.com/gcc-rs/gcc/index.html), which—despite the name—can also handle other C compilers on other platforms. And if you need to generate code for a perfect hash function, you use phf (https://docs.rs/phf_codegen/0.7.20/phf_codegen/). And so on. If you run into some other kind of common pattern across many projects, just write and publish another crate, and call it from build.rs.
These libraries typically do a lot of work to handle things like cross-platform compatibility.
If you already assume the programmer (1) knows Rust, and (2) might be running on either Linux, MacOS or Windows, this sort of interface is much more convenient than requiring them to get Makefiles and shell scripts working, and to handle per-platform compiler invocation issues, etc.
Does it get me the the type of closure arguments in the middle of chained method calls? That's what I'm currently missing from other tools.
But this, this is magnificent progress. Looking forward to trying it out!
When every language and every editor supports this protocol, who's going to want to use GCC for anything, when it's as closed (and thus relatively useful) as a brick?
Moving forward I'd say RLS will end up being better. As much as I like YCM/racer, it will be very hard to make the type info complete without reimplementing a full typechecker.