# \[ANN\] JuliaFormatter.jl

**URL:** <https://discourse.julialang.org/t/ann-juliaformatter-jl/48084>\
**Category:** Package Announcements\
**Tags:** package, announcement\
**Created:** [October 10, 2020, 1:29am UTC](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084 "2020-10-10T01:29:07Z")\
**Posts on this page:** 5\
**Page:** 3

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [August 27, 2021, 2:39pm UTC](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/41 "2021-08-27T14:39:02Z")

</div>

Well, it seems to break the example I [posted above](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/29).

---

<div class="post-metadata">

**Author:** ![domluna](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/domluna/32/18536_2.png) [@domluna](https://discourse.julialang.org/u/domluna)\
**Post date:** [August 27, 2021, 2:49pm UTC](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/42 "2021-08-27T14:49:06Z")

</div>

That’s because the formatter assumes positional arguments with default args are used **directly prior** to keyword arguments. Since you have a positional argument with no default argument after one with a default argument, when the semicolon is added the code breaks.

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 27, 2021, 2:50pm UTC](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/43 "2021-08-27T14:50:27Z")

</div>

basically you shouldn’t be calling function like `f(b=1, 0, c=3)` when you mean `f(0, b=1, c=3)`, but I guess it is indeed a bug since Julia parsed this correctly.

The fix to your specific problem is to have your positional argument at front:

```julia
html_div([dcc_dropdown(id = "input-id0", options = [Dict(("label" => "some text"), ("value" => "AA")), Dict("label" => "something else"), ("value" => "pdc")], style=Dict("width"=>"300px"), value="AA",multi = false)])

```

---

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [August 27, 2021, 2:52pm UTC](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/44 "2021-08-27T14:52:57Z")

</div>

Thanks. I realized this (now). I suppose the question is: how many other people out there might use a non canonical order of arguments and use JuliaFormatter on such code.

---

<div class="post-metadata">

**Author:** ![domluna](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/domluna/32/18536_2.png) [@domluna](https://discourse.julialang.org/u/domluna)\
**Post date:** [October 9, 2021, 4:00pm UTC](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/45 "2021-10-09T16:00:35Z")

</div>

Hey all, just want to plug v0.17 which is a bigger update than usual. It includes two new options

[`trailing_comma`](https://github.com/domluna/JuliaFormatter.jl#trailing_comma) (defaults to `true`). Related to added/removing/doing nothing with respect to trailing commas.

and

[`join_lines_based_on_source`](https://github.com/domluna/JuliaFormatter.jl#join_lines_based_on_source) (defaults to `false`). This one is pretty big! It gives you more control on how lines are joined, while still adhering to the style and margin.

The README file in the github repo now has all the options listed there which is much more accessible.

With these changes we’re one step closer to integrating with VSCode

[Previous page](https://discourse.julialang.org/t/ann-juliaformatter-jl/48084.md?page=2)
