# Helix + LanguageServer.jl + JuliaFormatter.jl

**URL:** https://discourse.julialang.org/t/helix-languageserver-jl-juliaformatter-jl/133755
**Category:** New to Julia
**Tags:** question, languageserver, formatting
**Created:** [November 9, 2025, 6:02am UTC](https://discourse.julialang.org/t/helix-languageserver-jl-juliaformatter-jl/133755 "2025-11-09T06:02:14Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![kousu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kousu/32/219064_2.png) [@kousu](https://discourse.julialang.org/u/kousu)
#### Post date: [November 9, 2025, 7:24am UTC](https://discourse.julialang.org/t/helix-languageserver-jl-juliaformatter-jl/133755/2 "2025-11-09T07:24:22Z")

</div>

I used the [experimental `juliac`](https://github.com/JuliaLang/julia/pull/55047) to build a statically linked formatter:

```julia-auto
$ cat jlfmt.jl 
using JuliaFormatter
function @main(ARGS::Vector{String})::Cint
    try
        for f in ARGS
            if f == "-"
                print(format_text(read(stdin, String)))
            else
                format_file(f)
            end
        end
        return 0
    catch e
        @error "err:" e
        return 1
    end
end

```

This didn’t work unfortunately, there were too many functions that can’t be trimmed yet I guess

```julia-auto
julia /usr/share/julia/juliac/juliac.jl --experimental --output-exe ./jlfmt --trim ./jlfmt.jl 

```

This did

```julia-auto
julia /usr/share/julia/juliac/juliac.jl --output-exe ./jlfmt ./jlfmt.jl 

```

It unfortunately took minutes and made a very large binary

```julia-auto
$ ls -lh jlfmt
-rwxr-xr-x 1 kousu kousu 264M Nov 9 01:27 jlfmt

```

but it worked in the end.

Here’s my config now:

```julia-auto
$ cat ~/.config/helix/config.toml 
theme = "autumn_night"

$ cat ~/.config/helix/languages.toml 
[[language]]
name = "julia"
auto-format = true
formatter = { command = "/home/kousu/src/jlfmt", args = ["-"] }

```

With this, formatting on save or with `=` works instantly.

This doesn’t seem like a good solution. The language server is supposed to handle formatting. I wish to get it to a point where it does, out of the box.

Unfortunately, format-on-save swallows errors silently; if I mangle the code enough it can’t be formatted then `=` shows an error (but only the first line of the error, and quickly) and format-on-save doesn’t at all.

---

_[View the full topic](https://discourse.julialang.org/t/helix-languageserver-jl-juliaformatter-jl/133755)._
