-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Description
The documentation of the Julia formatter states that directories will be search up from the current directory for a configuration file. However, that does not seem to be happening with the neovim formatter. I'm using LazyVim based on neovim 0.11.1 on macOS with Julia's LanguageServer.jl v4.5.1.
I have
dir/.JuliaFormatter.toml
dir/subdir/file.jl
If I cd to dir/subdir and edit file.jl, formatting the file applies the default formatting options (e.g., indent with 4 spaces). If I copy file.jl to the parent directory, and repeat, the settings in .JuliaFormatter.toml are applied (e.g., indent with 2 spaces).
Formatting directly from Julia works as advertised:
julia> add Pkg
julia> using Pkg
julia> Pkg.add("JuliaFormatter")
julia> using JuliaFormatter
julia> format("file.jl") # applies settings in ../.JuliaFormatter.tomlHere are a .JuliaFormatter.toml
indent = 2and file.jlto reproduce:
function f()
return 1 # default indent is 4
endAs far as I understand, LazyVim imports nvim-lspconfig, but does not pass any options. I did not change the default options either.
Wondering if I'm missing some configuration option or if others can reproduce.
Thank you in advance!