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

Make the best fit argument feature work with YAS style #808

Open
efaulhaber opened this issue Feb 13, 2024 · 3 comments
Open

Make the best fit argument feature work with YAS style #808

efaulhaber opened this issue Feb 13, 2024 · 3 comments

Comments

@efaulhaber
Copy link
Contributor

It currently only works on master with yas_style_nesting = false:

julia> str = """
       test = (arg1, arg2, arg3, arg4, arg5)
       """;

julia> print(format_text(str, SciMLStyle(), yas_style_nesting = false, margin = 32))
test = (arg1, arg2, arg3,
    arg4, arg5)

julia> print(format_text(str, SciMLStyle(), yas_style_nesting = true, margin = 32))
test = (arg1, arg2, arg3, arg4,
        arg5)
@efaulhaber efaulhaber changed the title Make the best fit argument feature work with yas_style_nesting = true Make the best fit argument feature work with YAS style Feb 14, 2024
@efaulhaber
Copy link
Contributor Author

As discussed in #807, it would be nice to have the best fit feature for YAS style as well, which would also fix the above.

@efaulhaber
Copy link
Contributor Author

@domluna before #792, SciML style was using default style n_tuple!, right? Why didn't you implement the best fit feature there? Do you not want default style to use the best fit feature? Or is there another reason I'm not seeing rn?

@domluna
Copy link
Owner

domluna commented Feb 14, 2024

it was using n_tuple! dispatched to DefaultStyle.

I didn't want to alter the current default style, but it might be reasonable to have it be an option that could be used in all the styles. The main use case was SciML, so for the time being, having it contained there was the easiest.

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

2 participants