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

Move leading_comments and trailing_comments to Elixir #174

Open
josevalim opened this issue Nov 30, 2024 · 4 comments
Open

Move leading_comments and trailing_comments to Elixir #174

josevalim opened this issue Nov 30, 2024 · 4 comments

Comments

@josevalim
Copy link

Hi @doorgan,

Amazing work on sourceror! It has been a very powerful tool for the growth of the Elixir community. I am wondering if it makes sense to move the leading_comment and trailing_comments metadata to Elixir. In particular:

  1. Add a include_comments option to string_to_quoted which attaches it to the relevant nodes
  2. Change the formatter to look for comments in the metadata instead of a separate value

I believe this should simplify the handing of comments here. Do you think this is desirable?

Thank you!

@zachdaniel
Copy link
Contributor

I'm in support of this. I personally believe that effectively all of sourceror should be part of the standard library, but baby steps 😅

@doorgan
Copy link
Owner

doorgan commented Dec 1, 2024

Hi Jose! I think that's a great idea. A few years ago I would have been a bit hesitant but now I think leading_comments and trailing_comments satisfies most of the use cases of the community. Having all that and the formatting be part of elixir instead of a third party library would be great!

@josevalim
Copy link
Author

@doorgan do you want to take a stab at that? Or should we put it on our own todo list?

@doorgan
Copy link
Owner

doorgan commented Dec 1, 2024

@josevalim Sure! I'll start working on that

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