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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document another way to use with rust-analyzer #127

Conversation

lukashermansson
Copy link
Contributor

This closes #126 by documenting the discussed alternative way to configure rust-anlyzer to use leptosfmt to format code

README.md Outdated
### Setting up with unstable directory based rust-analyzer configuration
An alternative way to configure `rust-analyzer` to use `leptosfmt` is to use directory based `rust-analyzer` configuration.

To do this named `rust-analyzer.toml` to the root of your project with the content:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To do this named `rust-analyzer.toml` to the root of your project with the content:
To do this, create a file named `rust-analyzer.toml` in the root of your project with the following content:

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or "add a file named ... to the root ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't believe how i messed this up :D nicely spotted

README.md Outdated

This method of setting up rust-analyzer is editor agnostic to any editor that uses `rust-analyzer` for formatting rust code

> Note: This feature of `rust-analyzer` is currently unstable and no guarantees are made that this will continue to work across versions.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention the minimum version required?
https://github.com/rust-lang/rust-analyzer/releases/tag/2024-06-10

Suggested change
> Note: This feature of `rust-analyzer` is currently unstable and no guarantees are made that this will continue to work across versions.
> Note: This feature of `rust-analyzer` is currently unstable and no guarantees are made that this will continue to work across versions. You have to use a recent version of `rust-analyzer` ([2024-06-10](https://github.com/rust-lang/rust-analyzer/releases/tag/2024-06-10) or newer).

@lukashermansson
Copy link
Contributor Author

@bram209 I like the proposed changes, updated the pr with adjustments now! Thanks for the feedback!

@lukashermansson lukashermansson requested a review from bram209 July 10, 2024 09:22
@bram209 bram209 merged commit d968d00 into bram209:main Jul 10, 2024
@bram209
Copy link
Owner

bram209 commented Jul 10, 2024

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

Document unstable project based rust analyzer config to override rustfmt
2 participants