How LSP could have been better
11–20 of 229 posts
Re: How LSP could have been better
#12Re: How LSP could have been better
#13Rather than fixing the problem by using code points, they made it worse by allowing any encoding. Now, not only do you need to support UTF-16, but also UTF-8 and UTF-32 [1].
[1] https://microsoft.github.io/language-server-protocol/specifi...
Re: How LSP could have been better
#14I want to write Python.
There’s one FOSS language server (pylsp) that’s a better fit for my needs than the other Python servers.
I want to use a certain commercial editor.
The editor and the language server don’t share a common configuration method.
Ergo, I can’t use the editor I’d like to write Python the way I want. It’s no one’s fault. The editor works just fine with other servers, for Python and for lots of other languages. The server is also operating within spec, and plenty of editors support its configuration method. However, they don’t play well with each other. I can still use the editor with that server as long as I’m ok with the default settings, but I’m not.
It would’ve been spiffy to have a preferred baseline method that all editors and language servers spoke, but they went the enterprisey “here are a hundred options - pick a few!” overly configurable direction.
Bummer. I really, really like that editor.
Re: How LSP could have been better
#15Re: How LSP could have been better
#16Re: How LSP could have been better
#17One thing that has annoyed me with some personal implementation work is why does DAP use a cosmetically similar but not following spec version of JSONRPC? Why not just use JSONRPC especially considering LSP already does?
Re: How LSP could have been better
#18One thing that has annoyed me with some personal implementation work is why does DAP use a cosmetically similar but not following spec version of JSONRPC? Why not just use JSONRPC especially considering LSP already does?
Re: How LSP could have been better
#19Does anyone know why LSP uses UTF-16 for encoding columns? It seems like everyone agrees it is a bad choice, so I'm curious about the original reasoning. Are there any benefits at all to using UTF-16, or was it something to do with Microsoft legacy code?
I believe the original producers and consumers of LSP were written in languages that had string lengths based on UTF-16, so it was the literal easiest way to do it, even though UTF-16 is probably objectively the most painful thing to compute if your string system isn't UTF-16.
LSP eventually got a solution where you can request something other than UTF-16 offset calculations, but I don't remember the details of what that solution is.
Re: How LSP could have been better
#20What the hell is LSP?