Closed yuriiShmal closed 1 year ago
seems like the bug is here: https://github.com/azdavis/millet/blob/e4ba865aff2184d76a9113a8967120918c6237f0/crates/lang-srv/src/helpers.rs#L54
the underlying bug is probably in PositionDb, which deals with translating utf16 offsets between utf8 ones (essentially). there's a bunch of subtle and tricky string munging code in there. it's heavily derived from rust analyzer's implementation, but i may have made some mistakes when copying it over.
it'd be great if rust analyzer pulled theirs out into a library so i could just copy it wholesale 🤪
should hopefully be addressed in v0.9.6 since we basically lifted rust-analyzer's handling of this stuff, which is way more thoroughly tested by virtue of rust/rust-analyzer being far more popular than sml/millet
This is the output. I don't think I have any fancy unicode characters. If I do, they should be on accident from option + whatever.