Which version of JuliaFormatter is used in VS code?

I would like to know which version of JuliaFormatter.jl is used by the Julia extension for VS Code when I run the command Format Document. I don’t have JuliaFormatter in my global env and also not in my current project environment.

I think that’d be v1.0.61, as specified here: julia-vscode/scripts/environments/languageserver/v1.11/Manifest.toml at v1.127.2 · julia-vscode/julia-vscode

Thanks! Do you know if it’s always using this version, or is there a way to change it?

I don’t think there is a way to change it. You can of cause run JuliaFormatter outside of the extension, wait for a new release of the extension with an updated version, or perhaps configure VSCode in another way similar to fredrikekre/Runic.jl: A code formatter for Julia with rules set in stone.

Thank you!

Another option for using JuliaFormatter V2 is to use that Custom Local Formatters extension to run jlfmt (requires new Julia 1.12 app feature)

jlfmt install instructions

  1. julia +1.12
  2. ]
  3. app add JuliaFormatter
  4. add ~/.julia/bin to your PATH if needed. (output suggests this)

Then configure it in VSCode settings:

  "customLocalFormatters.formatters": [
    {
      "command": "jlfmt --config-dir=. --prioritize-config-file",
      "languages": ["julia"]
    }
  ],