bug: Renaming files on typescript stopped working
Did you check the docs and existing issues?
- [X] I have read the docs
- [X] I have searched the existing issues
Neovim version (nvim -v)
0.10.0-dev
Operating system/version
linux
Describe the bug
I am on typescript using typescript-language-server, renaming files with oil worked fine until about three days ago until it stopped working, I tried using different ts lsp's but to no success so far
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
nvim 0.10.0 with typescript-language-server on linux ubuntu
Expected Behavior
When I rename a file it should adapt the imports
Directory structure
No response
Repro
-- Sorry I tried to do this repro thing but I couldn't make it work due to lazy.nvim (?)
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{
"stevearc/oil.nvim",
config = function()
require("oil").setup({
-- add any needed settings here
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Did you check the bug with a clean config?
- [X] I have confirmed that the bug reproduces with
nvim -u repro.luausing the repro.lua file above.
I'm having the same issue. I created a .tsx, imported it to another document, renamed it, and it won't update the import
I'm experiencing the same problem
I'm experiencing the same problem
For me, it fails only on big codebase projects. Otherwise, it works. I'm getting an LSP timeout error on large codebases
You could try bumping up the value of lsp_file_methods.timeout_ms.
If you create a toy environment (the ideal would be a public git repo) that reproduces the issue I can look into it.
I think we need a callback that gives us the list of operations, so we can apply additional ones ourselves - like replacing imports. Make sense?