prettier-plugin-rust icon indicating copy to clipboard operation
prettier-plugin-rust copied to clipboard

Roadmap 1.0.0

Open jinxdash opened this issue 2 years ago • 2 comments

Roadmap 1.0.0

This is the full list of features the project is missing before a full release. Open to suggestions.

Contributions are most welcome. 🤗

  • Formatting

    • Regular macros (requires upstream work on jinx-rust)
      • [ ] Support formatting declarations' "transformed" right-hand side part
      • [ ] Support complex formatting for macros used as types and patterns
      • [ ] Preserve heading/trailing separators
      • [ ] Preserve parentheses
    • Custom macros
      • [ ] ![expr; type]
      • [ ] matches!
      • [ ] if_chain!
      • [x] cfg_if!
      • [ ] ... others?
    • Options
      • [ ] Support the rustfmt attribute to ignore macros by id (within a file)
      • [ ] Support trailingComma option
      • [ ] Support language embedding
    • Prettier 3.0
      • [ ] Enable "useTabs" by default (is this controversial?)
      • [ ] Transition to v3 plugin API
    • [ ] Refactor code adapted from prettier core

  • Crate

    The prettier crate should provide a cargo fmt equivalent and a rudimentary API to use prettier in Rust.

    • [ ] Provide a command (cargo prettier? see prettier plugin ruby for reference)
    • [ ] Simple API to interface with prettier (e.g. prettier::format(&str, prettier::Config { .. }))
    • [ ] Investigate a way to version-control prettier & plugins from Cargo.toml (e.g. temp package.json in dev build directory?)
    • [ ] Investigate a way to config prettier from Cargo.toml (under [package.metadata.prettier])

  • Extension

    I wish this project didn't need an extension, but the official Prettier extension only supports loading plugins from npm modules. Installing and updating npm modules requires manually running shell commands, and my proposal to automate that process has been denied.

    Prettier core through its plugin system was designed to be universal. In practice however, its CLI and Editor integration are primarily focused on the javascript ecosystem. Publishing a "Prettier Rust" extension is the only ergonomic way to accomodate for the Rust ecosystem.

    • [ ] Support "format selection"
    • [ ] Support .prettierignore + alert when formatting fails because of it
    • [ ] Investigate and document a rustfmt config that is compatible with prettier's output
    • [ ] Handle internal extension errors
    • [ ] Write tests

  • Miscellaneous

    • [ ] Playground website to reproduce issues online
    • [ ] Setup CI tests for PRs
    • [ ] Setup CI publishing (package, extension, crate)

jinxdash avatar Aug 17 '22 13:08 jinxdash

hey! Is this project still maintained? Just wondering if it is since it looks really promising!

BlueskyFR avatar Sep 27 '23 00:09 BlueskyFR

Doesn't look like it

SheaFoxx avatar Nov 16 '23 10:11 SheaFoxx