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.toml
Here are a .JuliaFormatter.toml
and file.jlto reproduce:
function f()
return 1 # default indent is 4
end
As 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!
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.jlv4.5.1.I have
If I
cdtodir/subdirand editfile.jl, formatting the file applies the default formatting options (e.g., indent with 4 spaces). If I copyfile.jlto the parent directory, and repeat, the settings in.JuliaFormatter.tomlare applied (e.g., indent with 2 spaces).Formatting directly from Julia works as advertised:
Here are a
.JuliaFormatter.tomland
file.jlto reproduce:As 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!