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

How can I prevent JuliaFormatter from creating new lines after =? #803

Open
nathanaelbosch opened this issue Feb 9, 2024 · 2 comments
Open

Comments

@nathanaelbosch
Copy link

Example: I have the following code, which fits into the specified width:

R = isnothing(alg.pn_observation_noise) ? nothing :
      to_factorized_matrix(FAC, cov2psdmatrix(alg.pn_observation_noise; d))

I also use join_lines_based_on_source = true. But when I run JuliaFormatter, I get

R =
    isnothing(alg.pn_observation_noise) ? nothing :
    to_factorized_matrix(FAC, cov2psdmatrix(alg.pn_observation_noise; d))

With which setting can I prevet this from happening?

@domluna
Copy link
Owner

domluna commented Feb 10, 2024

nothing currently except increasing the margin

@nathanaelbosch
Copy link
Author

This is unfortunate. Maybe there is a way to add this to the join_lines_based_on_source option, so that no newlines are created when they don't need to? Just to prevent any confusion, my issue is the newline after the = that gets created even though all the lines are inside the margin. I'd be happy to contribute, I just don't really know where I should start looking.

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