# VSCode formatter not working

**URL:** https://discourse.julialang.org/t/vscode-formatter-not-working/136182
**Category:** New to Julia
**Tags:** question, vscode, formatting
**Created:** [March 13, 2026, 11:35am UTC](https://discourse.julialang.org/t/vscode-formatter-not-working/136182 "2026-03-13T11:35:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![acgc99](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acgc99/32/221170_2.png) [@acgc99](https://discourse.julialang.org/u/acgc99)
#### Post date: [March 13, 2026, 11:35am UTC](https://discourse.julialang.org/t/vscode-formatter-not-working/136182/1 "2026-03-13T11:35:36Z")

</div>

I made this function with a long signature:

```julia-auto
function foo(Aₙₘ::AbstractMatrix{Float64}, Eₙₘ::AbstractMatrix{Float64}, JAₙₘ::AbstractMatrix{Float64}, JEₙₘ::AbstractMatrix{Float64}, mn::Int, dn::Int, Cₙ::AbstractVector{Float64}, xₙ::AbstractVector{Float64}, Δxₙ::AbstractVector{Float64})
    println("Hi")
end

```

I’m using VSCode with Julia extension. I’m still not very familiar with both, but if I do: `Ctrl + Shift + P` and then `Format Document With ...` \> `Julia`, nothing happens.

![image](https://global.discourse-cdn.com/julialang/original/3X/2/8/28b81cbd51faa2b46e960f66bb6b587634aa9646.png)

These are my workspace settings:

```julia-auto
{
    "julia.cellDelimiters": [
        "^#(\\s?)%%",
        "^#-"
    ],
    "editor.formatOnSave": false,
    "[julia]": {
        "editor.defaultFormatter": "julialang.language-julia"
    }
}

```

Any idea about what can I do? Thanks!

---

<div class="post-metadata">

### Author: ![karei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/karei/32/214809_2.png) [@karei](https://discourse.julialang.org/u/karei)
#### Post date: [March 13, 2026, 11:44am UTC](https://discourse.julialang.org/t/vscode-formatter-not-working/136182/2 "2026-03-13T11:44:32Z")

</div>

This may be because your code is already formatted.

You can try modifying the code to

```julia-auto
function foo( Aₙₘ::AbstractMatrix{Float64}, Eₙₘ::AbstractMatrix{Float64}, JAₙₘ::AbstractMatrix{Float64}, JEₙₘ::AbstractMatrix{Float64}, mn::Int, dn::Int, Cₙ::AbstractVector{Float64}, xₙ::AbstractVector{Float64}, Δxₙ::AbstractVector{Float64})
            println("Hi")
end

```

and then try again to see if it works.

---

<div class="post-metadata">

### Author: ![acgc99](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acgc99/32/221170_2.png) [@acgc99](https://discourse.julialang.org/u/acgc99)
#### Post date: [March 13, 2026, 12:27pm UTC](https://discourse.julialang.org/t/vscode-formatter-not-working/136182/3 "2026-03-13T12:27:22Z")

</div>

Thanks for your response. That works, it removes unnecessary whitespaces, but I was expecting the long line to be splitted (like black formatter in python).

---

<div class="post-metadata">

### Author: ![karei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/karei/32/214809_2.png) [@karei](https://discourse.julialang.org/u/karei)
#### Post date: [March 13, 2026, 12:35pm UTC](https://discourse.julialang.org/t/vscode-formatter-not-working/136182/4 "2026-03-13T12:35:41Z")

</div>

Sure. Create a new file in your project’s root directory and name it

`.JuliaFormatter.toml`

Then simply paste the following text into it.

```txt
# See https://domluna.github.io/JuliaFormatter.jl/stable/ for a list of options
margin = 100

```

---

<div class="post-metadata">

### Author: ![acgc99](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acgc99/32/221170_2.png) [@acgc99](https://discourse.julialang.org/u/acgc99)
#### Post date: [March 13, 2026, 12:39pm UTC](https://discourse.julialang.org/t/vscode-formatter-not-working/136182/5 "2026-03-13T12:39:40Z")

</div>

I see, just having that file but empty is enough to use default values. Thanks!
