What is the status of #775? Should EOL be converted or preserved?
@Caio it needs design and implementation. I am not actually sure that the proposed solution is a good one, but it seems nice
Basically, we make it an invariant that any strings inside
\n as a line separator, and that any transcoding happens at the boundary
sort-of how python's text mode works
I guess the next step is to write some experimental impl which tries to convert line-endings at the lsp boundary
Changes in one direciton (text going from editor into analyzer) should be handled here: https://github.com/rust-analyzer/rust-analyzer/blob/69ee5c9c5ef212f7911028c9ddf581559e6565c3/crates/ra_lsp_server/src/server_world.rs#L103
@matklad Thanks! I guess it is going to take a while since I am still learning how rust-analyzer works
@matklad I suppose you're already aware, but there's a grammar WG which already has a parser and grammar for Rust that may be interesting to consider for r-a. @centril and @eddyb are part of the group
I am aware of that, yeah. The plan is to fuzz ra parser against the grammar, once that is ready.
We probably won't be able to reuse grammar/parser as is: we must deal with incomplete code well, and we need to be able to produce concrete syntax trees. We definitely should align the names of various types though!
Fantastic, I just wanted to make sure that you were aware of each other's work :)