Closed mehalter closed 8 months ago
One thing I immediately ran into was that LuaLS was running in single-file mode. This was because lua_sample/
didn't have any of the lspconfig-defined root files:
https://github.com/neovim/nvim-lspconfig/blob/7eed8b2150192e5ad05e1886fdf133493ddf2928/lua/lspconfig/server_configurations/lua_ls.lua#L3-L11
After adding one, nvim 0.9.5 started working. The issue with nightly was because of the filter glob matching. I thought that the paths were always relative to the workspace, and only matched against the absolute path on nvim <0.10 because it was covering a case that glob2reg couldn't handle. I thought that would be unnecessary on nvim 0.10 since we have real glob support, but turns out some LSP servers use absolute paths for their filter definitions, so we have to keep it.
Did you check the docs and existing issues?
Neovim version (nvim -v)
v0.10.0-dev-2051+gee3d4f6b9
Operating system/version
Arch Linux
Describe the bug
Lua language server LSP module renaming doesn't work in Oil. It doesn't prompt for modifications so something is going on with the LSP integration. I did testing on the latest stable neovim release and nightly. It seems related to nightly, on 0.9.5 it is working. It seems to work with both
vtsls
andtssserver
.vtsls
working and the lua language server not working is definitely a strange once since they both rely ondidRenameFiles
. So I'm not sure what is going on.In depth demonstration with the
repro.lua
below comparing the operation from my own fork that I had opened a PR with and the currentmaster
branch: https://asciinema.org/a/kfPxsdk1wEtwhJKp8JCo3plt2What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
nvim -u repro.lua lua_sample/init.lua
:LspInfo
, make sure lua language server is attached:Oil
, open the oil file manager and renametest.lua
tohello.lua
, save the buffer, and see that you don't get prompted to modify the requiresExpected Behavior
LSP integration should work.
Directory structure
lua_sample/init.lua
:lua_sample/test.lua
:Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.