# \#formatting

**URL:** https://discourse.julialang.org/tag/formatting/1009.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Write to XLSX file while maintaining formatting](https://discourse.julialang.org/t/write-to-xlsx-file-while-maintaining-formatting/87715)

<div class="topic-metadata">

**Author:** [@Carl\_Talsma](https://discourse.julialang.org/u/Carl_Talsma)\
**Replies:** 2\
**Last updated:** [August 30, 2026, 2:54pm UTC](https://discourse.julialang.org/t/write-to-xlsx-file-while-maintaining-formatting/87715 "2026-08-30T14:54:34Z")

</div>

Hi, I’m trying to write data to a .xlsx file that has already been formatted (cell size, colors, etc.). Is there anyway to write data to a .xlsx file while maintaining the existing formatting? I’m currently using the XL…

---

## [\[ANN\] Fatou: a fast Julia language server, formatter, and linter (that doesn't need Julia to work)](https://discourse.julialang.org/t/ann-fatou-a-fast-julia-language-server-formatter-and-linter-that-doesnt-need-julia-to-work/138553)

<div class="topic-metadata">

**Author:** [@jolars](https://discourse.julialang.org/u/jolars)\
**Replies:** 5\
**Last updated:** [August 6, 2026, 6:37am UTC](https://discourse.julialang.org/t/ann-fatou-a-fast-julia-language-server-formatter-and-linter-that-doesnt-need-julia-to-work/138553 "2026-08-06T06:37:06Z")

</div>

Hi all, I’m happy to announce Fatou: a language server, formatter, and linter for Julia, that doesn’t need to run Julia itself. Repo: GitHub - jolars/fatou: Julia language server, formatter, and linter built in Rust ·…

---

## [\[ANN\] JuliaFormatter v2 updates](https://discourse.julialang.org/t/ann-juliaformatter-v2-updates/137818)

<div class="topic-metadata">

**Author:** [@penelopeysm](https://discourse.julialang.org/u/penelopeysm)\
**Replies:** 8\
**Last updated:** [July 10, 2026, 8:47am UTC](https://discourse.julialang.org/t/ann-juliaformatter-v2-updates/137818 "2026-07-10T08:47:03Z")

</div>

TL;DR If you’re using Default or Blue styles with JuliaFormatter.jl, v2.10 is (probably) production ready. It’s extensively tested and produces idempotent formatting as long as you disable certain options which are known…

---

## [Looking for test cases for JuliaFormatter, i.e., please give me your big Julia repositories](https://discourse.julialang.org/t/looking-for-test-cases-for-juliaformatter-i-e-please-give-me-your-big-julia-repositories/137569)

<div class="topic-metadata">

**Author:** [@penelopeysm](https://discourse.julialang.org/u/penelopeysm)\
**Replies:** 6\
**Last updated:** [June 19, 2026, 9:21pm UTC](https://discourse.julialang.org/t/looking-for-test-cases-for-juliaformatter-i-e-please-give-me-your-big-julia-repositories/137569 "2026-06-19T21:21:59Z")

</div>

Hello! Since being moved to JuliaEditorSupport a few weeks ago, v2 of JuliaFormatter has had a lot of updates and bug fixes (by my count, 47 issues have been closed by recent PRs – that is excluding old issues which no l…

---

## [VSCode formatter not working](https://discourse.julialang.org/t/vscode-formatter-not-working/136182)

<div class="topic-metadata">

**Author:** [@acgc99](https://discourse.julialang.org/u/acgc99)\
**Replies:** 4\
**Last updated:** [March 13, 2026, 12:39pm UTC](https://discourse.julialang.org/t/vscode-formatter-not-working/136182 "2026-03-13T12:39:40Z")

</div>

I made this function with a long signature: function foo(Aₙₘ::AbstractMatrix{Float64}, Eₙₘ::AbstractMatrix{Float64}, JAₙₘ::AbstractMatrix{Float64}, JEₙₘ::AbstractMatrix{Float64}, mn::Int, dn::Int, Cₙ::AbstractVector{Flo…

---

## [Which version of JuliaFormatter is used in VS code?](https://discourse.julialang.org/t/which-version-of-juliaformatter-is-used-in-vs-code/127885)

<div class="topic-metadata">

**Author:** [@dharasim](https://discourse.julialang.org/u/dharasim)\
**Replies:** 5\
**Last updated:** [January 30, 2026, 2:12am UTC](https://discourse.julialang.org/t/which-version-of-juliaformatter-is-used-in-vs-code/127885 "2026-01-30T02:12:48Z")

</div>

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 e…

---

## [JuliaFormatter.jl set tab indent by default](https://discourse.julialang.org/t/juliaformatter-jl-set-tab-indent-by-default/87499)

<div class="topic-metadata">

**Author:** [@monty](https://discourse.julialang.org/u/monty)\
**Replies:** 1\
**Last updated:** [December 6, 2025, 12:23am UTC](https://discourse.julialang.org/t/juliaformatter-jl-set-tab-indent-by-default/87499 "2025-12-06T00:23:56Z")

</div>

How to force JuliaFormatter.jl to use tab indent by default? Thank you!

---

## [Helix + LanguageServer.jl + JuliaFormatter.jl](https://discourse.julialang.org/t/helix-languageserver-jl-juliaformatter-jl/133755)

<div class="topic-metadata">

**Author:** [@kousu](https://discourse.julialang.org/u/kousu)\
**Replies:** 12\
**Last updated:** [November 13, 2025, 2:10pm UTC](https://discourse.julialang.org/t/helix-languageserver-jl-juliaformatter-jl/133755 "2025-11-13T14:10:38Z")

</div>

I’m trying to move from vscode to helix to save my RAM for Julia. I’m on helix 25.07.01, julia 1.12.1. I haven’t configured anything except $ cat ~/.config/helix/config.toml theme = "autumn\_night" $ cat ~/.config/hel…

---

## [NeoVIM/julia-lsp + formatting on subfolders respecting .JuliaFormatter.toml](https://discourse.julialang.org/t/neovim-julia-lsp-formatting-on-subfolders-respecting-juliaformatter-toml/105900)

<div class="topic-metadata">

**Author:** [@abelsiqueira](https://discourse.julialang.org/u/abelsiqueira)\
**Replies:** 1\
**Last updated:** [October 14, 2025, 2:15pm UTC](https://discourse.julialang.org/t/neovim-julia-lsp-formatting-on-subfolders-respecting-juliaformatter-toml/105900 "2025-10-14T14:15:29Z")

</div>

Hi NeoVIM users. How are you dealing with the formatting of the subfolders? The issue: I have .JuliaFormatter.toml at the root of the project I have docs/Project.toml If I open docs/make.jl, the LSP root is docs/, and…

---

## [On formatting the display of integer arrays](https://discourse.julialang.org/t/on-formatting-the-display-of-integer-arrays/132023)

<div class="topic-metadata">

**Author:** [@rcomm](https://discourse.julialang.org/u/rcomm)\
**Replies:** 6\
**Last updated:** [September 1, 2025, 5:48pm UTC](https://discourse.julialang.org/t/on-formatting-the-display-of-integer-arrays/132023 "2025-09-01T17:48:14Z")

</div>

I do combinatorial work which generates arrays containing small integers. Some arrays are large, so to reduce memory footprint all calculations are done in UInt8. Part of the analysis is to visually scan displays of se…

---

## [Linter/formatter for naming conventions?](https://discourse.julialang.org/t/linter-formatter-for-naming-conventions/131539)

<div class="topic-metadata">

**Author:** [@DanielSussman](https://discourse.julialang.org/u/DanielSussman)\
**Replies:** 1\
**Last updated:** [August 13, 2025, 8:20pm UTC](https://discourse.julialang.org/t/linter-formatter-for-naming-conventions/131539 "2025-08-13T20:20:21Z")

</div>

Hi all, I’m working on writing more idiomatic Julia code and trying to adhere to a common style. I know this is a relatively minor detail, but for whatever reason – old habits die hard, I guess! – I consistently fail to…

---

## [Adjust the decimals in scientific notation with Plots.jl](https://discourse.julialang.org/t/adjust-the-decimals-in-scientific-notation-with-plots-jl/131555)

<div class="topic-metadata">

**Author:** [@kraqbi](https://discourse.julialang.org/u/kraqbi)\
**Replies:** 8\
**Last updated:** [August 13, 2025, 3:24pm UTC](https://discourse.julialang.org/t/adjust-the-decimals-in-scientific-notation-with-plots-jl/131555 "2025-08-13T15:24:10Z")

</div>

Hello! I try to publish my figures so I need to edit them as nicely as possible. I have trouble adjusting the format of my ylabel. I would like to keep a scientific notation, but Plots.jl is automatically set to a two…

---

## [Engineering formatting with SI prefixes using Formatting.jl](https://discourse.julialang.org/t/engineering-formatting-with-si-prefixes-using-formatting-jl/103107)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 3\
**Last updated:** [June 12, 2025, 7:55am UTC](https://discourse.julialang.org/t/engineering-formatting-with-si-prefixes-using-formatting-jl/103107 "2025-06-12T07:55:15Z")

</div>

I am trying to use pretty formatting engineering with Formatting.jl but I fail. Is it possible to automatically format numbers with SI prefixes and, ideally, be able to select precision? E.g.: 0.01 → 10m 0.022 → 22m …

---

## [How do you like to save your data and how much customizability do you like/need?](https://discourse.julialang.org/t/how-do-you-like-to-save-your-data-and-how-much-customizability-do-you-like-need/129707)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 5\
**Last updated:** [June 8, 2025, 2:39pm UTC](https://discourse.julialang.org/t/how-do-you-like-to-save-your-data-and-how-much-customizability-do-you-like-need/129707 "2025-06-08T14:39:01Z")

</div>

I’m making an application that controls a spectrometer (among other things). The program is likely to be saving dozens if not hundreds of spectra, each being about 0.5MB. There’s also some positional metadata that comes…

---

## [Round a float, and force a specific number of decimal places](https://discourse.julialang.org/t/round-a-float-and-force-a-specific-number-of-decimal-places/87547)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 8\
**Last updated:** [May 2, 2025, 8:28pm UTC](https://discourse.julialang.org/t/round-a-float-and-force-a-specific-number-of-decimal-places/87547 "2025-05-02T20:28:23Z")

</div>

Rounding a float to two decimal places, say, does not necessarily create a number with two decimal places. For example round(10.001, digits = 2) produces 10.0 How can I force a specific number of shown decimal places? …

---

## [Replicating formatting from Fortran code output](https://discourse.julialang.org/t/replicating-formatting-from-fortran-code-output/127036)

<div class="topic-metadata">

**Author:** [@trung](https://discourse.julialang.org/u/trung)\
**Replies:** 6\
**Last updated:** [March 17, 2025, 3:37pm UTC](https://discourse.julialang.org/t/replicating-formatting-from-fortran-code-output/127036 "2025-03-17T15:37:38Z")

</div>

I am trying to replicate the formatting from a Fortran code output in Julia. Here is a MWE. program formattest implicit none integer:: iyd real(4):: d(4),t iyd = 10000 d = 9.999e-38 t = 1.053e10…

---

## ["simple" Dates one line question](https://discourse.julialang.org/t/simple-dates-one-line-question/125465)

<div class="topic-metadata">

**Author:** [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)\
**Replies:** 6\
**Last updated:** [February 11, 2025, 4:06pm UTC](https://discourse.julialang.org/t/simple-dates-one-line-question/125465 "2025-02-11T16:06:24Z")

</div>

can a Dates guru help me with the one line function DateString(now()) that returns a string: Sat 01 Feb 2025 2:33pm I can’t figure out why Date(now()),DateFormat("yyyy-mm-dd")) is not valid… but I’m also being lazy… …

---

## [Formatting floating point values as fixed width for printing with "$(value)"?](https://discourse.julialang.org/t/formatting-floating-point-values-as-fixed-width-for-printing-with-value/123968)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 3\
**Last updated:** [December 19, 2024, 1:23am UTC](https://discourse.julialang.org/t/formatting-floating-point-values-as-fixed-width-for-printing-with-value/123968 "2024-12-19T01:23:37Z")

</div>

I’m trying to add some logging to an existing codebase. I am trying to add some timing information to these logs. Logs are quite simple, they are just println statements wrapped by some functions. I would like to be a…

---

## [Print string on specific character position](https://discourse.julialang.org/t/print-string-on-specific-character-position/121402)

<div class="topic-metadata">

**Author:** [@danrib07](https://discourse.julialang.org/u/danrib07)\
**Replies:** 4\
**Last updated:** [October 17, 2024, 1:13pm UTC](https://discourse.julialang.org/t/print-string-on-specific-character-position/121402 "2024-10-17T13:13:17Z")

</div>

Hi everyone, I’m trying to format some diagnostics for a Julia project I’m working on, and I was wondering if there’s a way to format strings such that the output is printed on a specific character position? For example,…

---

## [How to use format\_md in JuliaFormatter](https://discourse.julialang.org/t/how-to-use-format-md-in-juliaformatter/117773)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 0\
**Last updated:** [August 2, 2024, 7:11pm UTC](https://discourse.julialang.org/t/how-to-use-format-md-in-juliaformatter/117773 "2024-08-02T19:11:56Z")

</div>

Hello, I would like to know how to use the function format\_md in JuliaFormatter. For example, how do I format markdown files used with Documenter.jl? Thank you.

---

## [Configuring Julia formatter and linter with nvim-lspconfig for neovim](https://discourse.julialang.org/t/configuring-julia-formatter-and-linter-with-nvim-lspconfig-for-neovim/114746)

<div class="topic-metadata">

**Author:** [@mostafatouny](https://discourse.julialang.org/u/mostafatouny)\
**Replies:** 17\
**Last updated:** [June 6, 2024, 7:56am UTC](https://discourse.julialang.org/t/configuring-julia-formatter-and-linter-with-nvim-lspconfig-for-neovim/114746 "2024-06-06T07:56:42Z")

</div>

Hello, For Neovim, I have successfully integrated LanguageServer.jl through lspconfig as instructed here. Auto-completion and hover documentation worked. screenshot I want to integrate JuliaFormatter.jl and StaticLint.…

---

## [How to change default number of digits printed for PrettyPrint](https://discourse.julialang.org/t/how-to-change-default-number-of-digits-printed-for-prettyprint/114463)

<div class="topic-metadata">

**Author:** [@freedomjin](https://discourse.julialang.org/u/freedomjin)\
**Replies:** 2\
**Last updated:** [May 20, 2024, 10:02pm UTC](https://discourse.julialang.org/t/how-to-change-default-number-of-digits-printed-for-prettyprint/114463 "2024-05-20T22:02:11Z")

</div>

Hi, I found PrettyPrint.jl quite handy when printing complex data structures, however, for large nested structures, pprint attempts to show all Float values to maximum precision and often overflows entire screen. Is it…

---

## [Displaying numbers in Julia](https://discourse.julialang.org/t/displaying-numbers-in-julia/112807)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 15\
**Last updated:** [April 11, 2024, 11:04pm UTC](https://discourse.julialang.org/t/displaying-numbers-in-julia/112807 "2024-04-11T23:04:27Z")

</div>

I want to make a very simple calculation: julia\> 6500 \* ( (1.10)^58 ) 1.6356451710902702e6 But, the format I’m hoping to for is 1,635,645.17 or 1635645.17. I spent 10 minutes searching the internet & Julia built in h…

---

## [How to use @sprintf with "parametric" format string?](https://discourse.julialang.org/t/how-to-use-sprintf-with-parametric-format-string/70364)

<div class="topic-metadata">

**Author:** [@ryszard314159](https://discourse.julialang.org/u/ryszard314159)\
**Replies:** 5\
**Last updated:** [April 1, 2024, 9:01pm UTC](https://discourse.julialang.org/t/how-to-use-sprintf-with-parametric-format-string/70364 "2024-04-01T21:01:33Z")

</div>

Is there a way to use @sprintf with “parametric” format string? or it has to be hardcoded? This is an example: julia\> @sprintf(“test: %s”, “test”) “test: test” julia\> fmt = “test: %s”; @sprintf(fmt, “test”) ERROR: L…

---

## [JuliaFormatter for imports / using](https://discourse.julialang.org/t/juliaformatter-for-imports-using/111704)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 4:57pm UTC](https://discourse.julialang.org/t/juliaformatter-for-imports-using/111704 "2024-03-18T16:57:43Z")

</div>

I like writing my imports / using statements in the following style: import CairoMakie import CSV import HDF5 import KernelDensity import Makie import StatsBase using DataFrames: DataFrame using Distributions: Gamma usi…

---

## [@printf: significant digits in floating point representation](https://discourse.julialang.org/t/printf-significant-digits-in-floating-point-representation/29978)

<div class="topic-metadata">

**Author:** [@MatFi](https://discourse.julialang.org/u/MatFi)\
**Replies:** 12\
**Last updated:** [March 9, 2024, 8:58pm UTC](https://discourse.julialang.org/t/printf-significant-digits-in-floating-point-representation/29978 "2024-03-09T20:58:32Z")

</div>

hi i want tu use @sprintf to format a number to floating point representation with a fixed amount of significant digits how can I do that? The function shout act the following way: .000012340000 -\> 0.000012 .12340000…

---

## [How to add tab to module with JuliaFormatter](https://discourse.julialang.org/t/how-to-add-tab-to-module-with-juliaformatter/111121)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 1\
**Last updated:** [March 5, 2024, 7:48pm UTC](https://discourse.julialang.org/t/how-to-add-tab-to-module-with-juliaformatter/111121 "2024-03-05T19:48:52Z")

</div>

Hi all, I would like to modify the default behavior of JuliaFormatter so that it produces module MyModule using ... ... end instead of left alignment: module MyModule using ... ... end Thanks!

---

## [Formatting or Format?](https://discourse.julialang.org/t/formatting-or-format/9477)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 19\
**Last updated:** [February 26, 2024, 11:29pm UTC](https://discourse.julialang.org/t/formatting-or-format/9477 "2024-02-26T23:29:23Z")

</div>

Formatting.jl is nice but it doesn’t seem to be maintained…? Format.jl is a fork that looks more active. What’s the story here? Are we going to consolidate these?

---

## [\[ANN\] Format.jl updates (many bug fixes, new features)](https://discourse.julialang.org/t/ann-format-jl-updates-many-bug-fixes-new-features/110252)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 4:15pm UTC](https://discourse.julialang.org/t/ann-format-jl-updates-many-bug-fixes-new-features/110252 "2024-02-22T16:15:44Z")

</div>

Format.jl has been updated to fix a number of critical bugs (that were inherited from Formatting.jl), as well as implementing new capabilities to better match Python format strings, such as ^ for center justification, al…

---

## [Compact string representation of a float](https://discourse.julialang.org/t/compact-string-representation-of-a-float/108526)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [January 8, 2024, 6:35pm UTC](https://discourse.julialang.org/t/compact-string-representation-of-a-float/108526 "2024-01-08T18:35:19Z")

</div>

I want the compact (in the sense of IOContext(io, :compact =\> true)) string representation of a floating point number or vector for inclusion in a Quarto document. Currently I define a function function compact(x; buf:…

[Next page](https://discourse.julialang.org/tag/formatting/1009.md?match_all_tags=true&page=1&tags%5B%5D=formatting)
