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

Add string rewriting assists #69

Merged
merged 5 commits into from
Mar 11, 2023
Merged

Add string rewriting assists #69

merged 5 commits into from
Mar 11, 2023

Conversation

figsoda
Copy link
Contributor

@figsoda figsoda commented Mar 10, 2023

Copy link
Owner

@oxalica oxalica left a comment

Choose a reason for hiding this comment

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

This PR is quite complicated. It would be better to split them into multiple small assists since they share no common code. Documentations can be added on individual fns. But they can still live in one mod.

About naming, my suggestion is to use the form rewrite_<from>_to_<to> for rewriting assists.

  • rewrite_uri_to_string
  • rewrite_string_to_indented
  • rewrite_indented_to_string

quote_attr and unquote_attr are okay to me.

Finally, don't forget to append to docs/code_actions.md.

crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
@figsoda figsoda requested a review from oxalica March 10, 2023 16:36
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
crates/ide/src/ide/assists/rewrite_string.rs Outdated Show resolved Hide resolved
@figsoda figsoda requested a review from oxalica March 11, 2023 01:00
@oxalica oxalica changed the title Add rewrite_string assist Add string rewriting assists Mar 11, 2023
@oxalica oxalica merged commit e5fcdc1 into oxalica:main Mar 11, 2023
@figsoda figsoda deleted the rewrite-string branch March 11, 2023 15:07
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.

2 participants