Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap 1.0.0 #3

Open
1 of 27 tasks
jinxdash opened this issue Aug 17, 2022 · 2 comments
Open
1 of 27 tasks

Roadmap 1.0.0 #3

jinxdash opened this issue Aug 17, 2022 · 2 comments

Comments

@jinxdash
Copy link
Owner

jinxdash commented Aug 17, 2022

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!
      • 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 jinxdash pinned this issue Aug 17, 2022
@BlueskyFR
Copy link

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

@SheaFoxx
Copy link

Doesn't look like it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants