# Neovim + lsp + formatter (again)

**URL:** https://discourse.julialang.org/t/neovim-lsp-formatter-again/132800
**Category:** Tooling
**Tags:** languageserver, neovim, juliaformatter
**Created:** [October 1, 2025, 8:48am UTC](https://discourse.julialang.org/t/neovim-lsp-formatter-again/132800 "2025-10-01T08:48:17Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Al3cLee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/al3clee/32/218582_2.png) [@Al3cLee](https://discourse.julialang.org/u/Al3cLee)
#### Post date: [October 14, 2025, 3:00pm UTC](https://discourse.julialang.org/t/neovim-lsp-formatter-again/132800/2 "2025-10-14T15:00:40Z")

</div>

Roughly, the pipeline is like this:

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

* * *

**The depend arrow.** Upon installing the `julials` server of `nvim-lspconfig` as instructed [here](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#julials), one should have a folder

```julia-auto
~/.julia/environments/nvim-lspconfig

```

which looks like

```julia-auto
.
├── Manifest.toml
└── Project.toml

```

and inside `Manifest.toml`, one can find an entry `[[deps.JuliaFormatter]]`, which means that the language server depends on `JuliaFormatter` to do the LSP formatting.

So, to configure the formatting of this LSP, rather than controlling the behavior of some NeoVim plugin, one actually needs to configure the behavior of the `JuliaFormatter.jl` package.

* * *

**The config arrow.** In the docs of `JuliaFormatting.jl`, there is a section on how to use `.JuliaFormatter.toml` files to config the package. The project directory needs to have this dotfile and a `Project.toml` file (the latter is required!).

Note also that, once it sees a `Project.toml`, `JuliaFormatter` regards this as the root of its working directory, and stops searching for config files higher on the tree. See [this issue](https://github.com/mason-org/mason-lspconfig.nvim/issues/172), for example, and [this post](https://discourse.julialang.org/t/neovim-julia-lsp-formatting-on-subfolders-respecting-juliaformatter-toml/105900).

---

_[View the full topic](https://discourse.julialang.org/t/neovim-lsp-formatter-again/132800)._
