126 points by agluszak 3 days ago | 55 comments | View on ycombinator
weinzierl about 6 hours ago |
qudat about 1 hour ago |
Honestly, my LSP requirements are minimal: go to def, find all references, and symbol search. I’ve been wanting to try ctags for awhile and finally made the switch.
Another consideration were all the posts about how grep is better than LSPs for LLMs.
It really pushed me to just get better at grep. There have been a ton of benefits: I can symbol search outside of my editor, it’s much faster than an LSP, minimal configuration. It feels more like a universal tool I can use instead of a tool for IDEs.
Panzerschrek about 13 hours ago |
I have written a language server for my language too. The hardest thing was to find a way allowing providing useful autocompletion for a document in edited state, when it's not syntactically-correct. This is the trickiest part how to deal with such incorrectness without missing all the context necessary.
mitxela about 16 hours ago |
klodolph about 13 hours ago |
impl std::fmt::Display for Blah {
}
If your language makes you qualify your imports (like above) then your LSP can, delightfully, still reliably do certain ops like renaming, even when chunks of your project aren’t parsing. But if you glob import std::fmt, and glob import something else, you are fucked. Display could come from anywhere (maybe from a module that has a parse error at the moment). I really appreciate languages where glob imports (or their equivalent) are either disallowed entirely or where typical code doesn’t use it.Meanwhile, if you add a new file, there’s this little dance where you say:
mod mycoolmod;
And then you create mycoolmod.rs. Or you do it the other way around. A little redundancy (the file exists and it is declared), that seems to just create a little friction in the LSP because mycoolmod doesn’t get a working LSP until it’s declared in the parent (you have to create both, and then you get a transient diagnostic that your module is unused for a while yet). A small issue, just another little bit of friction in the tooling of Rust that has nothing to do with the type system.undefined about 11 hours ago |
octoberfranklin about 16 hours ago |
LSP is an example of utterly horrid technical design.
Stop letting Microsoft design protocols and APIs. They are so. bad. at. it.
mohd_rafay about 8 hours ago |
dominotw about 5 hours ago |
chrisjj about 10 hours ago |
Not as hard as understanding what LSP means, apparently.
I was interested until I saw this project is simply an LSP server.
1. Editing help
2. Reliable and comprehensive analysis
The editing help needs to deal with incomplete and inconsistent state and answers on a best effort basis. This is good when I'm writing code.
When I'm trying to understand code it usually is in a complete and compiling state but best effort is not enough. I expect complete and exhaustive answers.
Independently of that I'd love to read a similar analysis that compares the approaches of rust-anslyzer, rust-glancer and the JetBrains analysis engine in Rust Rover.