4 ms·
It probably won’t surprise you to learn that I had LSP in mind when writing my previous comment. :-) I think there is a wider issue here than the (still very u
by Chris_Newton 6y ago
It probably won’t surprise you to learn that I had LSP in mind when writing my previous comment. :-)
I think there is a wider issue here than the (still very useful) scope of LSP, though. If you are building a tool that depends heavily on the semantics of the source language, beyond common operations like “go to definition”, you might need more than a standardised language server can provide, and then you’re back to the position I described before.
- wenc 6y agoI had the sense it was on the tip of your tongue since the way you described it matched to a T, but I decided to flesh it out for folks who hadn't heard of LSPs. :) You're right, at this moment, the LSP is circumscribed in that it doesn't expose the AST (even though it could) which means one is limited to the capabilities it does expose. The claim is that the goal is parity across languages and exposing the ASTs is contrary to this [1]. I'm hoping this philosophy is challenged. In the mean time one might have to rely on languages themselves exposing their ASTs, eg. Python is able to expose its ast (via the ast module). So yes, right now one wouldn't be able to write say an IntelliJ IDEA type IDE based off a language server alone -- one wouldd have to be able to create the AST oneself. [1] https://github.com/Microsoft/language-server-protocol/issues/258 https://github.com/Microsoft/language-server-protocol/issues...