# NeoVIM/julia-lsp + formatting on subfolders respecting .JuliaFormatter.toml

**URL:** https://discourse.julialang.org/t/neovim-julia-lsp-formatting-on-subfolders-respecting-juliaformatter-toml/105900
**Category:** Tooling
**Tags:** vim, languageserver, neovim, formatting
**Created:** [November 7, 2023, 1:22pm UTC](https://discourse.julialang.org/t/neovim-julia-lsp-formatting-on-subfolders-respecting-juliaformatter-toml/105900 "2023-11-07T13:22:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![abelsiqueira](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abelsiqueira/32/47269_2.png) [@abelsiqueira](https://discourse.julialang.org/u/abelsiqueira)
#### Post date: [November 7, 2023, 1:22pm UTC](https://discourse.julialang.org/t/neovim-julia-lsp-formatting-on-subfolders-respecting-juliaformatter-toml/105900/1 "2023-11-07T13:22:23Z")

</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 the formatter doesn’t search for `.JuliaFormatter.toml` one step above (by design: [JuliaFormatter.toml files not seen · Issue #1115 · julia-vscode/LanguageServer.jl · GitHub](https://github.com/julia-vscode/LanguageServer.jl/issues/1115))

How are you dealing with that? Not formatting via VIM?

Thanks in advance.

---

<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, 2:15pm UTC](https://discourse.julialang.org/t/neovim-julia-lsp-formatting-on-subfolders-respecting-juliaformatter-toml/105900/2 "2025-10-14T14:15:29Z")

</div>

Note that the JuliaFormatter will prefer a lower-level tree’s `.JuliaFormatter.toml`, see [the docs](https://domluna.github.io/JuliaFormatter.jl/stable/config/#Search-Rule). It also stops searching for `.JuliaFormatter.toml` files when it sees a `Project.toml`. A more detailed discussion is [here](https://github.com/mason-org/mason-lspconfig.nvim/issues/172).

I am not sure why you didn’t put the `Project.toml` file in the root of your project though (maybe you’re doing a nested environment setup), but if you simply want your `docs/make.jl` formatted in some specific manner by `JuliaFormatter`, you can create a `docs/.JuliaFormatter.toml`, which can be an actual file or a symbolic link to the root file `.JuliaFormatter.toml`, depending on what you want.

Aside: I’m not sure what the GitHub issue link that you posted refers to. I use NeoVim too, and set up my Julia LSP as instructed [here](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#julials), and I actually can use `.JuliaFormatter.toml` files to control my formatting, but the issue says

> but LS.jl never sees any of my toml files

which I think is wrong. It could be that the person who raised the issue forgot to put a `Project.toml` file in the project path, or forgot to initiate their project, or whatever, but it’s absurd that the language server does not see any toml file.
