Interesting discussion from an IntelliJ dev on what an IDE needs in a parser:
https://www.reddit.com/r/rust/comments/6fs5q9/language_servers_and_ides/dinhtiz (eg the parse tree must have comments)
Related Posts
Counter-intuitively, if you're writing a parser for a programming language, you need it to be a total function. As soon as you build IDE tooling, you need ASTs from invalid or incomplete input.
The parser should return (Ast, List<Error>) rather than Result<Ast, Error>.
ASTs typically discard comments, and that's usually what you want.
The only time (AFAICS) that preserving comments is useful is for writing a code formatter.
Could you write a formatter in terms of a list of lexemes? A CST is a non-trivial bit of code for one use case.
Delighted to see that Typescript 7 is moving to conventional LSP for its IDE services!
https://devblogs.microsoft.com/typescript/progress-on-typescript-7-december-2025/#resetting-language-service-issues