6 ms·
For anyone interested in similar tools, Microsoft recently published a protocol[1] for this type of service, and an implementation[2] of it for VSCode+NodeJS.
by favorited 10y ago
For anyone interested in similar tools, Microsoft recently published a protocol[1] for this type of service, and an implementation[2] of it for VSCode+NodeJS.
Swift also has a library[3] called SourceKit which does the same thing for Swift – it can run as an out-of-process daemon, and people have written integrations for Atom, Emacs, etc. to get autocomplete, syntax highlighting, def links, etc.
[1]https://github.com/Microsoft/language-server-protocol https://github.com/Microsoft/language-server-protocol
[2]https://github.com/Microsoft/vscode-languageserver-node https://github.com/Microsoft/vscode-languageserver-node
[3]https://github.com/apple/swift/tree/master/tools/SourceKit https://github.com/apple/swift/tree/master/tools/SourceKit
- nrc 10y agoIndeed, the RLS uses that protocol to communicate with IDEs.
- favorited 10y agoThanks, I totally missed that. That's pretty great – I thought it was a neat idea from MS, but I was worried it would get any traction. Glad to have been wrong!
- steveklabnik 10y agoA lot of us in Rust-land are very big fans of VS: Code and what they're doing. I'm in the process of switching to it as my primary editor.
- pjmlp 10y agoThe work the community has been doing there is great. The Rust development experience in VS: Code is the only reason why I use it. Kudos to everyone.
- bjz_ 10y agoYeah, I switched to VS Code because of the nice Rust plugin, and the editor is now really growing on me! The Elm support is also getting quite good.
- moosingin3space 10y agoDoes VS Code have a decent Vim-style plugin yet?
- Yackson 10y agoTry https://github.com/VSCodeVim/Vim https://github.com/VSCodeVim/Vim. It's being built my MS and they are quick to respond to feedback and pull requests.
- wbond 10y agoIf it really pushes syntax highlighting to another process and uses JSON for serialization, that is going to impose a cap on editor performance.
- pcwalton 10y agoRust's JSON serializer is really fast (~300 MB/s). http://erickt.github.io/blog/2014/12/13/performance-digression/ http://erickt.github.io/blog/2014/12/13/performance-digressi...
- wbond 10y agoI'm imaging more along the lines of serializing editor state with each key press, encoding it, sending it to another process, having that process unserialize it, lex it, encode all of the cascading token changes and information about those tokens back into JSON, sending it back to the editor process which then has to decode the JSON and apply all of the token information to the in-memory representation as real overhead. It's great that Rust will decode and encode the JSON quickly (I've been keeping an eye on Rust's MSVC progress before I consider using it for a real-world project), but the project I work on cares about optimizations on the level of in-memory data layout and memory allocations. Moving syntax highlighting into a pluggable system would be a huge performance regression.
- steveklabnik 10y agoThere was a talk at RustConf by Raph Levien about his editor, Xi. It almost entirely uses JSON-RPC to communicate through a distributed architecture, and next-level speed is one of his design goals: https://confreaks.tv/videos/rustconf2016-a-modern-editor-built-in-rust https://confreaks.tv/videos/rustconf2016-a-modern-editor-bui... > I've been keeping an eye on Rust's MSVC progress before I consider using it for a real-world project The latest builds of MSVC claim to have native Rust syntax highlighting and autocomplete, I have not yet tried it myself: https://www.visualstudio.com/news/releasenotes/vs15-relnotes https://www.visualstudio.com/news/releasenotes/vs15-relnotes
- markdog12 10y agoThe Dart team have done a similar thing
- akio 10y agoElixir too. https://github.com/tonini/alchemist-server https://github.com/tonini/alchemist-server
- wging 10y agoThe first one of these that I remember reading about is Marijn Haverbeke's Tern: http://ternjs.net http://ternjs.net
- kibwen 10y agoFun fact: Marijn Haverbeke was one of the original Rust developers back in the pre-0.1 era.