Why is zig lsp so bad?

I don’t want to deny your opinion, but I’m curious about what you think is so bad about zls ?

At least when used with VSCode, the default settings do not discover almost any build errors while typing code in the editor. (I recently asked about this here: How to get more out of Zig ZLS with VSCode? and the fix is to use “zig build check” and configure the ZLS plugin to use that. Why this is not the default or otherwise emphasized in docs, I don’t know.)

I’ve recently also found that “autofixing” unused variables messes up and breaks my code quite often. (Although I’m in the camp that’d prefer not having to do this “fixing” to get my build to pass while editing code - esp. when debugging something.)

I find that things like go to symbol work pretty well. Some other things, like a lot of things involving comptime, tend to fall off the working path.

Symbol rename works reasonably well, although it seems to have issues when renaming struct fields. It’s not always able to rename all uses of that symbol in a single zig file.

Even with its faults, ZLS improves the Zig experience for me a lot, and I probably wouldn’t even code Zig if I didn’t have it.

4 Likes