Skip to content

Roadmap 1.0.0聽#3

Description

@jinxdash

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions