4 ms·
The Language Server Protocol is flawed already in its concept, as this article https://perplexinglyemma.blogspot.de/2017/06/language-servers-and-ides.html https
by kuschku 9y ago
The Language Server Protocol is flawed already in its concept, as this article https://perplexinglyemma.blogspot.de/2017/06/language-servers-and-ides.html https://perplexinglyemma.blogspot.de/2017/06/language-server..., which was also on #1 of HN before, argues.
It instead proposes to have the language server expose the entire AST and environment that is available at each point, and have the IDE uses that for autocompletion, as this is far more powerful than what is currently doable with LSP. (Currently, the editor just transmits cursor position and content to the LSP, which then does all the highlighting, autocompletion, etc. This is not only less configurable, and less consistent, but also less usable, as often the LSP isn’t able to offer as smart autocompletions)
Many IDEs, such as the JetBrains IDEA platform, do exactly this with their language plugins.
- Analemma_ 9y agoI mentioned this at the time too: I think this was a deliberate decision by Microsoft and it is not a deal-breaker. LSP is a Minimum Viable Product that was deliberately kept simple to encourage uptake and not spook people away. Once people are comfortable that it is a good idea and not an EEE play by Microsoft, version 2.0 could be upgraded to support things like ASTs.
- kuschku 9y ago> version 2.0 could be upgraded to support things like ASTs. That’s called "you can create an entirely new API that’s entirely different, but might use the same name". That’s the issue here, LSP is so fundamentally flawed you’d have to scrap it entirely to support what is needed for a real IDE.