‹ BackHN Continuity

Thread

Why building a Rust LSP is hard

144 points · 77 comments · agluszak

  1. weinzierl · · focus · HN ↗
    Reading this made me realize that I want two different things from an LSP that are sometimes at odds with each other:

    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.

    1. wannabe44 · · focus · HN ↗
      I feel most LSPs I used are fairly good at both. Sometimes I get no completion suggestions, look at the sidebar and fix compile errors, then start getting suggestions. For whatever reason, it's a fine trade off for parsing errors.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.