Stream: t-compiler/rust-analyzer

Topic: Cargo.toml completion and formatting


Iulian Gabriel Radu (Oct 23 2020 at 15:25, on Zulip):

Hello, totally not sure if it's the right place to ask, but is Cargo.toml completion and formatting a goal of Rust Analyzer? If so, there's a issue that I can track or contribute to? I'm talking about code completion for sections, keys (maybe with docs/links to Cargo reference, e.g. https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-name-field) and similar nice to have features. I think IntelliJ Plugin has something similar. Thanks!

Edit: To be even more clear, I'm not talking about generic TOML support. Something more specialized than that.

matklad (Oct 23 2020 at 15:27, on Zulip):

It is a goal, but a long term one

matklad (Oct 23 2020 at 15:27, on Zulip):

to do this, we'll need make https://github.com/matklad/tom or an equivalent production ready

Iulian Gabriel Radu (Oct 23 2020 at 15:31, on Zulip):

I see. Is the status still accurate? Rowan rewrite still in progress?

matklad (Oct 23 2020 at 15:32, on Zulip):

Probably not, I haven't looked at that code for quite some time

Iulian Gabriel Radu (Oct 23 2020 at 15:33, on Zulip):

So what would be the next step for matklad/tom then? :sweat_smile:

matklad (Oct 23 2020 at 15:34, on Zulip):

Upgrade it to modern rowan, make sure that the API makes sense

matklad (Oct 23 2020 at 15:34, on Zulip):

Design, whether the API should expose rowan directly or not

matklad (Oct 23 2020 at 15:34, on Zulip):

Design, where there should be a separate cargo.toml language server, or whether rust-analyzer should use tom as a library

Iulian Gabriel Radu (Oct 23 2020 at 15:38, on Zulip):

Ok, I think I will take a look at the project and see if I can help. Thanks!

Laurențiu (Oct 23 2020 at 16:15, on Zulip):

Short-term there's a Better TOML extension that knows the manifest schema.

Eh2406 (Oct 23 2020 at 16:20, on Zulip):

Note that when you have a wight space preserving toml library that is good we may want to use it in cargo. I know that @Eric Huss has put a lot of work into that.

pksunkara (Oct 28 2020 at 07:27, on Zulip):

@Iulian Gabriel Radu I have started working on it last week. Do you want to combine efforts so that we don't duplicate?

Last update: Jul 29 2021 at 21:45UTC