Clangd already exists (it was contributed and mainly maintained by Google, IIRC), and works great. It supports LSP, and works fine with vscode.
What apple is investing in is making it their default tooling.
So the benefits of this change are exclusive to apple xcode (ATM) :)
The benefits to using clangd in general are (among poher things) editor agnosticism and scaling.
If everyone uses libclang, libclang must scale to every codebase (or a least, the interface, and then you'd have to replace/relink it).
If everyone uses LSP, you just need something that speaks LSP, and scales to your codebase.
At the scale of Google's codebases, for example, the first is untenable, the second is doable.
Certainly missing LSP functionality helps everyone, but the rest depends quite a lot on approach and details.
While with common IDE plugins, you have one implementation of the refactoring functionality, and each language plugin just exposes an AST.
So LSP actually leads to more duplicated code and worse editors.
VS Code will never be able to match the functionality of IDEA unless each language server reimplements all the functionality slightly differently. What a mess.
https://github.com/Ruin0x11/intellij-lsp-server
That being said, as an implementor I'm finding cases where LSP's feature set is underdeveloped. For example, there is nothing in the spec to account for renaming files, so I can't put in my rename action without the behavior being incorrect (because if you rename a class in Java you have to rename the corresponding file, which IDEA handles). Also some things require custom LSP requests, like getting the list of build configurations to run. I think this is a product of the Java support in IDEA being so much more comprehensive than anything in LSP so far. But hopefully as the spec is improved these issues will be worked out
Is your complaint that they're not iterating fast enough? Because this is something I'd prefer they take their time and get it right, especially once we get past the low-hanging fruit and into complex things like debugging.
Language servers should expose an AST, not some actions. Language Servers shouldn't even know where the cursor is — or how many there are.
With a proper LSP, you can also write a linter just by using the protocol, you can call the same action on a thousand places at the same time, and the refactoring functionality is implemented only once, and reused everywhere.
The entire design of LSP is flawed.
Just like LSP. Just a more intelligent protocol.
You have one implementation of refactoring, instead of, as today, one per language.
In fact, the code in IDEA that does this is open source, so you can start with it, and build a better LSP based on it.
Actually, if this were just a lib in Xcode, then instead of sourcekitd crashing, Xcode would crash all the time. Would you really prefer that?
What for you might need it on iOS? Server is meant to run on a development machine.
While I totally agree, I can see the author's point. Think for example about Swift Playgrounds.
There's no reason to discount iOS as a development machine–it's perfectly fine for coding, as Swift Playgrounds shows. (Actually, there are some issues with executing code in third party apps, but I'm working on a way to bypass the restrictions around this. Check back again soon!)