logoalt Hacker News

Meekrolast Wednesday at 3:34 PM9 repliesview on HN

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.


Replies

rob74last Wednesday at 3:58 PM

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).

throawayonthelast Wednesday at 3:54 PM

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

Groxxlast Wednesday at 6:03 PM

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.

show 2 replies
iknowstufflast Wednesday at 3:52 PM

You should learn about LSPs

mtoner23last Wednesday at 3:53 PM

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

show 3 replies
tecoholiclast Wednesday at 8:51 PM

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.

keithnzlast Wednesday at 7:29 PM

you could just get your AI to configure it for you

extrlast Wednesday at 4:03 PM

[flagged]