Closed mehalter closed 3 months ago
I personally don't use neoconf anymore, but the only recent change I made related to what you describe should now be reverted in that new commit.
Can you confirm this is now working as expected again?
Yup that seems to work again! Thanks so much @folke !
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0 (github release)
Operating system/version
Arch Linux
Describe the bug
I noticed recently some of my language servers that shouldn't be starting are starting and not respecting the
root_dir
that they have defined either the defaults provided bylspconfig
nor the ones I specify in my own configuration. This lead me down one crazy rabbit hole of source code digging until I found that Neoconf is actually overridingroot_dir
function in a way that makes it always set the root directory if aneoconf.json
file is set. This really messes up language servers that require configuration files to function and so theroot_dir
is quite strict to only enable when those configuration files are present.Steps To Reproduce
Requires: lua language server in path, I picked one I figured you probably have, feel free to adjust the
repro.lua
accordinglyrm -rf .repro
, make sure it's a clean environmentnvim -u repro.lua repro.lua
, run neovim and openrepro.lua
:LspInfo
, see that 0 clients are attached to the buffertouch .neoconf.json
, make an empty Neoconf configuration filenvim -u repro.lua repro.lua
, run neovim and openrepro.lua
:LspInfo
, see that 1 client is attached to the bufferExpected Behavior
I would expect that my language servers respect the
root_dir
that are set for them. A lot of language servers have blanket root directories such as.git
, but this is not all of them. Many language servers require the presence of configuration files and therefore having a blanket root directory is bad. Also, even if there is a default blanket type of root directory, if I manually set root directory configuration, it should be respected fully. It seems like with the current implementation in Neoconf, there is no way to remove behavior at all.Repro