5 ms·
The "server" in "language server" does not mean "server you access over the network" but "other process (on your machine) your editor talks to". (This is just t
by killercup 10y ago
The "server" in "language server" does not mean "server you access over the network" but "other process (on your machine) your editor talks to". (This is just the spec for a protocol.)
- protomyth 10y agoCan it be on across the internet? So, Apple can or cannot set up an internet service for Swift? If I think I have a better version can I point my editor towards that? If I program in a couple of languages, do I need to get ahold of servers to install?
- Arcsech 10y agoTo answer your points in order: No reason it couldn't talk across the Internet, I guess, if you're comfortable sending your source code to whoever is running the server and dealing with network latency on your autocomplete. Yes, you could easily point your editor to a different server, this protocol is basically just an API spec. And lastly, yes, you would (likely) need a different server for each of your languages - this project just provides a way to let an IDE implement one API client that can be used with each different language's tools.
- protomyth 10y ago> To answer your points in order: No reason it couldn't talk across the Internet, I guess, if you're comfortable sending your source code to whoever is running the server and dealing with network latency on your autocomplete. I'm thinking as part of a remote learning class. I'm pretty comfortable that it wouldn't violate any student privacy rules.
- Etzos 10y ago> Can it be on across the internet? In theory, yes the protocol can be used across the internet, but that would raise plenty of issues (security being a huge one). This is designed so that any program, like an IDE, can get code analysis and more without having to build special handling for each of them. > So, Apple can or cannot set up an internet service for Swift? Again, in theory they could. But why would they do that? Just run the server locally and get all the information there. > If I think I have a better version can I point my editor towards that? Yes. You simply stop the currently running language server and start the one you want to use instead. > If I program in a couple of languages, do I need to get ahold of servers to install? Yes. Each language would, in theory, provide its own server to do analysis. Of course, your favorite IDE would likely be more than happy to start the server for you if it's not running yet (as it's just a small process that runs in the background). If you want to see how this works in practice just grab Visual Studio Code and start editing a Typescript file. This is already in use there.
- protomyth 10y ago> In theory, yes the protocol can be used across the internet, but that would raise plenty of issues (security being a huge one). This is designed so that any program, like an IDE, can get code analysis and more without having to build special handling for each of them. I'm pretty sure I would be ok at part of teaching a class. > Again, in theory they could. But why would they do that? Just run the server locally and get all the information there. I was getting at that from the student-level. I'm pretty sure some metrics on edge problems in a remote learning class might help with the material revisions.