Comment by Meekro

1 day ago

Coming from Sublime, I'd never even heard of a Language Server when I first tried Zed. As I recall, disabling particular kinds of warnings required copy-pasting some pretty exotic incantations into my project config. All of it was poorly documented, and it felt like I was doing something nobody expected me to do. Instead, I should have been able to mouse over a particular warning and say "don't warn me again about things like this", at which point Zed should edit the project config for me.

Well, PHPStorm (and the other JetBrains IDEs) does it this way. You can disable a certain "inspection" globally, per project, per file, per method or just for one occurence - the last three work by inserting annotations into the code. Then again, PHPStorm costs money (not just if you want AI assistance), and is based on (drum roll) Java technology (although JetBrains don't advertise this fact a lot nowadays).

that does sound like a pretty nice ui idea to add to code actions (command + .), it already lets you one-click add an ignore comment iirc so probably not too hard to wire a global per-project option

however, i think LSP or integrated linters/typecheckers have been standard fare in editors for a while now (zed does seem to have a lot more set up by default, but i like the sane defaults most of the time). The "correct" solution would be to configure whatever lsp zed is running for the project the way you want, and reap the benefits even outside of zed. for php the tools are listed here: https://zed.dev/docs/languages/php the main one seems to be Phpactor and you should be able to configure it globally or per project https://phpactor.readthedocs.io/en/master/usage/configuratio...

but i understand the frustration, sometimes i try to navigate an ancient python codebase and it really is a sea of red

Yeah, I really can't stand every vscode has done to the ecosystem for settings. JSON as a storage format for config is entirely fine, but it's a truly awful UX for changing things. But they're successful and it's easy to build, so everyone mindlessly copies them.

  • Mind you that vscode does have an ui to change the settings. Also it has code completion when editing the json because of the linked json schema.

    • It has a UI to change some of the settings. And not even all of the settings with autocomplete help - I have no idea why those aren't equivalent to each other at least as a fallback, but they very clearly are not. And plugins frequently have major settings documentation gaps, including absolutely massively used ones like Go.

      Compare that to something like a JetBrains product.

  • Zed is highly configurable via JSON (so already puts them in a tier above many editors) and also for some things like shortcuts provides an actual interface for editing that JSON. I imagine as time goes on they'll expose more interfaces for editing configurations. For now I'll take JSON over nothing/gui-only.

LSP is how all editors work today and its simplified everything so so much. you should figure them out

  • While this comment is overly general (some major editors ship without LSP support built in; many more do not have a sane configuration out-of-the-box), it is useful to learn about them and how your editor of choice integrates with them.

    The landscape isn't generally intuitive, unfortunately, and while it's getting better, understanding the differences and interop places between LSP, Treesitter, DAP, your editor, and the underlying language-specific tooling can be a big, confusing time hog.

    That said, and to be clear: LSP's been a huge boon for me. I used a minimal, kinda-broken configuration for a while with Python, then rebuilt the whole thing when I switched to Rust for work, and holy hell, this thing's awesome.

    • This is way too equivocating.

      You are a craftsman, learn your tools. Could you imagine the equivalent from other professionals? A machinist saying, "Understanding the differences and interop places between the DRO, hand controls, and CNC controls for the lathe can be a big confusing time hog."

      It takes a couple of hours, and it's a tool you use every single day. Learning how it works is the price of entry, not a mountain to overcome.

      13 replies →

If you have never used an LSP and don’t need it, you can just turn the LSP off. I do it from the UI (thunderbolt icon on bottom bar I think) for some projects which don’t have LSP typing support. There should also be a setting to turn off permanently.