Closed rictic closed 6 years ago
@TimvdLippe It looks like the atom team is officially adopting atom-languageclient: https://github.com/atom/atom-languageclient
They've been hacking on it for the past month it seems. Probably fairly early, but we should be able to do something like:
import * as cp from 'child_process';
import {AutoLanguageClient} from 'atom-languageclient';
class PolymerIde extends AutoLanguageClient {
getGrammarScopes () { return [ 'source.html', 'source.js', 'source.css' ]; }
getLanguageName () { return 'Web'; }
getServerName () { return 'Polymer IDE'; }
startServerProcess () {
return cp.spawn('node', [ require.resolve('polymer-editor-service/lib/polymer-language-server') ]);
}
}
module.exports = new PolymerIde();
@rictic That is amazing news! Especially given that it is an official package. It does seem that it uses FlowTyped and not Typescript, so that is something we need to take care of. Let's try it out and see if it works :stuck_out_tongue:
Fixed by #69!
https://atom.io/packages/atom-languageclient looks like a Language Service Protocol client for atom. The Language Service Protocol is a standard protocol that grew out of VS Code's (very well designed) language services system. This is potentially a big win for atom support because it would further reduce the surface area of Atom-specific code that we'd maintain, and make it even simpler for us to keep feature parity across editors.
The language service protocol has been getting some uptake since it was announced a couple months ago. There's an Eclipse implementation on the client side, and it looks like the Rust community is planning to leverage it heavily as part of their editor strategy.
I believe that we already have an implementation of LSP on the server side as part of the vscode implementation. Using it with atom-languageclient may involve little more than publishing the server separately on npm.