codedownio / codedown-languages

Language packs for CodeDown (kernels, language servers, package managers, etc.)
1 stars 0 forks source link

Rust: current RNLS has a problem with lacking semicolons #54

Closed thomasjm closed 11 months ago

thomasjm commented 11 months ago

Unfortunately lines without semicolons are a normal part of evcxr. See the evcxr_jupyter_tour.ipynb notebook for examples.

Our current strategy of wrapping the rust in a big function isn't working; rust-analyzer doesn't like the missing semicolon and fails to parse after it.

Maybe ask in a rust-analyzer issue about it?

We might need to do fancier stuff in RNLS. Which will likely require a rust parser. The ones in Hackage don't look up to date:

https://hackage.haskell.org/package/tree-sitter-rust https://hackage.haskell.org/package/language-rust

thomasjm commented 11 months ago

https://github.com/rust-lang/rust-analyzer/issues/9343#issuecomment-1831325176

thomasjm commented 11 months ago

This seems to be good now with the addition of replace_end_delimiter_with

614bcfa04f90e35a091f1624dae6dad494c67884