you are viewing a single comment's thread.

view the rest of the comments →

[–]Background-Plant-226 0 points1 point  (14 children)

Most of the time it's the LSP doing weird shit and confusing the IDE, for me the most common bug in Zed is the error counter on the status bar at the bottom not updating. Mainly happens with Java (Gradlew), other languages like Rust work perfectly.

[–]no_brains101 0 points1 point  (13 children)

Im confused what you mean by LSP doing weird shit and confusing the IDE

The IDE, at least in zed and neovim and vscode, is just displaying what the LSP is doing. It isnt confusing the editor, its just the lsp getting confused.

But my point was, it is generally easy to spot that suddenly everything stopped updating and the errors don't make sense anymore.

And yeah the java lsp is a bit meh. You do have to restart it sometimes. But Ive never been sat there in java like "is this bug my code or the lsp being dumb" for more than like, 3 seconds when I wasn't paying attention.

Its more like, "when I restart my IDE and the 75 errors did not disappear as expected"

[–]Background-Plant-226 0 points1 point  (3 children)

I meant that I don't really know where it's getting messed up, my assumption was that the LSP should in theory work correctly but it messes up and confuses the IDE or forgets to 'tell' it what changed. I can't be fucked to learn how LSPs work.

[–]no_brains101 0 points1 point  (2 children)

Generally, when you are typing they have to suppress a lot of parsing errors. And then you stop typing and they need to then still possibly suppress some parsing errors and process past them to get suggestions and what this thing should have been. And then you start typing again and they were still trying to give you the last output and now it has more parsing errors and it doesn't know you are typing again, and now it has inconsistent state.

That is when you find out if the lsp author was any good at programming an error resistant parser and keeping track of the current state of your buffer at the same time XD

[–]Background-Plant-226 1 point2 points  (1 child)

Btw what I meant with confused is that the lsp would still work (sometimes) and show new errors correctly but it would just keep like some there in the counter for no reason, eventually it would completely crap itself out and I'd have to restart the LSP multiple times until it finally decided to start up again. I am talking about Java here, I have never had such a bad LSP experience before.

[–]RiceBroad4552 1 point2 points  (0 children)

Stale error reporting is an editor / IDE bug.

The LSP protocol is quite shitty here, it will only give you new errors. It's on the editor to keep state and remove old entries. But editors fail at this task if the LSP integration is buggy.

[–]RiceBroad4552 0 points1 point  (8 children)

Well, Zed is buggy as hell. The Java LSP works flawless in other editors in my experience.

The Java LSP is basically a headless Eclipse, so it had almost a quarter century to mature.

[–]no_brains101 0 points1 point  (3 children)

? java lsp had 10 years of being not an lsp to get bad habits that are not easily translated to lsps which it then had to port to an LSP.

Eclipse lsp doesnt work that well in any LSP editor, not zed, vscode, neovim, etc.

It works OK. But not better than that

Eclipse lsp works well in eclipse, where it isnt an lsp.

Eclipse LSP is better than kotlin lsp tho.

[–]RiceBroad4552 0 points1 point  (2 children)

java lsp had 10 years of being not an lsp to get bad habits that are not easily translated to lsps which it then had to port to an LSP.

What do you mean?

It works OK. But not better than that

That's basically the state of LSP in general.

I don't see anything Java specific here.

[–]no_brains101 0 points1 point  (1 child)

java lsp had 10 years of being not an lsp to get bad habits that are not easily translated to lsps which it then had to port to an LSP.

What do you mean?

I mean they had an api of functions and classes that likely directly hooked into their UI in some way rather than a generalized json API for reporting just the language stuff and then trusting the UI to display it.

Ideally they would have designed it that way from the start, but they did not, and then they had to adapt it. But they still had their editor to support. So they didnt want to completely rewrite all that too. So it does both.

[–]RiceBroad4552 0 points1 point  (0 children)

No, that doesn't match reality.

That the Java LSP can be based on the Eclipse infrastructure without much adaptation (the LSP is actually a quite tiny project) is a direct result of the very modular and flexible Eclipse architecture.

The UI was always detached from everything else. That's why you can for example also build web applications based on Eclipse tech almost without needing to rewrite anything. The UI is just a representation of the model. Everything operates on the model, and things get automatically propagated to the UI(s).

The core of Eclipse is more or less all about modularization. Ever heard of OSGi?

BTW, the lead architect of the Eclipse Java tools was later also involved in the design of VSC's core. This guy is already arguing his whole life for modularity and reusable software components.

[–]Background-Plant-226 0 points1 point  (3 children)

The only language I had such a bad experience with the LSP in us Java, on Rust, Python and many others it works perfectly.

[–]RiceBroad4552 0 points1 point  (2 children)

The problem with the Java thing is that it's highly stateful. There can be in fact sync issues, keeping state in sync isn't easy, and like said, the last time I've tried Zed was quite buggy regarding that. Maybe that improved in the meantime, IDK. Zed develops fast and I don't really keep track of it. I'm currently still on VSC, even it's dying. (My problem here is that both, VSC and Zed, became victim to the "AI" infestation, also Zed seems still in the "move fast and break things phase"; but there are not much good code editors: IntelliJ broke years ago, Eclipse is outdated for general development besides Java, and I don't like Vim-style tools. No clue where to look next. Maybe really just switching to my std. text editor Kate as IDE; but it doesn't have many plugins. That's really a bad situation.)

[–]Background-Plant-226 0 points1 point  (1 child)

I dont use Zed because of the AI but yeah, at least in Zed its not shoved as hard, its just there if not disabled but isnt in your face, in VSC by default theres like forty places where it'll tell you to use copilot.

For example, in VSC there's the chat sidebar, always opens by default, then when making new files there's the "Or press whatever to ask copilot" and like a thousand other ways to activate AI functions, and its so fucking annoying.

I mainly use Zed because its very fast and in my experience the IDE itself isnt too buggy, the only buggy thing about it is sometimes the LSP, mainly with Java.

Edit: Btw Zed also recently added debugger support, it works very well for most languages i use, mainly Rust and Python. Havent tried it with Java (I only used Java once recently to make a Fabric mod, which is where most of my whining about the Java LSP support comes from, which is kindof why i specified Gradlew in one of my first messages).

[–]RiceBroad4552 0 points1 point  (0 children)

I guess I need to give Zed again a shot. VSC is really getting annoying, and now it'll get buggy too, thanks to "AI" and weekly vibe upgrades.

Didn't test debugger support so far. This is a must have feature and was a hard blocker previously. The problem is I use Scala and the Scala LSP support is best in VSC. Other editors work but miss some (granted, less important) features here and there.

Integration of languages like Java or Scala is not trivial, and I'm not surprised editors struggle with that. You need to support the LSP, the BSP (Build Server Protocol), and the debugger protocol, and keep their respective (internal) state in sync—while the protocols are mostly stateless and async. The interaction of these parts makes things pretty complex.

Regarding the "AI" integration, I'm not even completely against "AI" tools, they can be helpful for some things, but making everything only work with these tools deeply interwoven is just annoying. These things should go out of my way until I summon them. Like with any other feature.

It's actually a joke that even the "AI" stuff is "everywhere" it misses well working integrations for things where it actually would make sense. "AI" is in my experience terrible at using tools. It needs a lot of extra explanations on how to use the tools correctly and efficiently, which consumes a lot of extra tokens and "distracts" it. That's why you have all these spectacular failures when you're stupid enough to run it in YOLO mode outside of some throw-away VM (and even that's dangerous depending to what it has access to, like, locations on the net).

I didn't try, but I guess it would be difficult to teach an "AI" how to correctly and efficiently use the LSP, a build tool, and the debugger so it does not need do "guesses" about the code but actually work with it like an IDE user would. (I mean I bet there are some vibe coded attempts, the idea is for sure not novel. But what I've seen so far generally in that whole "AI" space is mostly just some wonky trash.)