LSP is the troyan horse of Microsoft
LSP is the troyan horse of Microsoft
The LSP protocol is an "nice" way of decouple the "language engine"(libraries that take care of things related to indexing, autocompletion, tooltip…) and the editor, creating a common backend.
This gives the editors the ability to just implement a client, and add support for a variety of languages, reducing the development time of implementing new language support.
All and all, this sound amazing, it's like a "plug and play" but for programming languages , it can save development time and get the editor closer to a full IDE.
Where is the catch?
We are in the year 2018, Github is the most used git forge in the world, it contains probably 80%~ of new free software projects, and even tho the backend is proprietary, the web interface is nice and encourage a platform for central collaboration so is easy to find people and projects.
So, Github is basically a single point of failure for the free and open source community that Microsoft smartly exploit, buying it for US$7.5 billions.
This is probably one of the biggest tragedies in the free software history, along with the acquisition of Sun by Oracle, Microsoft played really smart, making some of his software "open source" to convinced some part of the FLOSS community that they are now "the good guys" this has been refute countless of times, but the marketing team of M$ can really make people think otherwise.
VScode is a general purpose code editor, it is also base on the electro framework, but in order not to copy 100% Atom (at the time, 2015 Github wasn't a property of M$), they manage to create LSP (along with Read Hat) so the new editor can be build around this new LSP concept.
Still, Atom was doing pretty good, so the Github acquisition was almost mandatory to ensure that there is only one go to editor for web related languages.
As a side note, the VScode that 90% of the people download is proprietary.
So, given this context, we can see why VScode is right now the most editor used in the world:
- It has a major company behind
- It has virtually no competition (at least in web related technology)
Giving that LSP is an open protocol, that is supported by virtually all the major editors, it is not crazy to think that editor will move to this concept of "just been a front-end for LSP", so every new editor can focus only in the "non language integration part".
Not all LSP language servers provide the same functionality
This means that the language you chose to develop, may have different support depend on the LSP that you are using, some of them will have excellent support, while others may provide just a couple of basic things.
Understanding that VScode is written in typescript (a language controlled by M$), there is a lot of language written in that language.
This means that in order to get code completion support for Dockerfile (for example) you need to have Nodejs, which if you only use VScode, no problem, right?
LSP complexity to a rather easy to solve problem.
Some people just want some code completion and goto definition, having a server running in the background with hundreds of calls it's a huge overkill.
LSP BIG problem
Microsoft is using this strategy to attract user to this paradigm, and then block the extensions they want to, sometimes deprecating a free software project in favor of a proprietary one, this is the big deal.
Remember, this is the standard M$ strategy, they move the competition, making his software the only viable option, and then make the stack proprietary so all the market is controlled by them, this is the well know strategy of embrace, extend, and extinguish.
Don't trust M$, use Emacs and embrace GNU.