Closed Zeioth closed 9 months ago
:LspStop
and then :LspStart
→ The source will fail to re-startMaybe null-ls times out? When I do :LspRestart
, I don't experience this bug.
It seems manually running :lua require("null-ls").enable({})
after :LspStart
fixes the issue. I'm gonna keep testing.
Anticipated per troubleshooting.
The null-ls got archived (as of Aug 12, 2023) so you are better to look for alternatives like efm-langserver
Plugins requiring active LSP may fail or misbehave if they fail to hook into LSP events: LspAttach
or LspDetach
; It seems like nul-ls
fails to do so.
It seems manually running
:lua require("null-ls").enable({})
I suggets to create an autocmd for that as a workaround and tell me whether it works or not:
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
require("null-ls").enable({})
})
I would strongly suggest to drop null-ls
.
Cool I was writing it. We reached the solution at the same time.
vim.api.nvim_create_autocmd({ "LspAttach" }, {
desc = "Start null-ls when starting a lsp client",
callback = function()
pcall(function() require("null-ls").enable({}) end)
end,
})
Ok with that I can fix it on NormalNvim. If you don't want to PR the change, at least would maybe be nice adding it to the readme, because it's a issue many people will propably find.
I use none-ls for now, but I'm secretly rooting for efm-langserver. I think it is a better approach.
Summary
This is my
:NullLsInfo
when I open my file (it's loadingbeautysh
).And this is the same![screenshot_2023-10-16_05-22-28_698973754](https://github.com/hinell/lsp-timeout.nvim/assets/3357792/6505bf78-06ee-41e7-9552-cbc48146a3ca)
lsp-timeout
reload the clients (it doesn't load it anymore)Just to clarify, null-ls itself works fine (for example, on C, it will work correctly after restoring lsp-timeout because it don't require sources).
If you could try to reproduce, I would be thankful.
Steps to reproduce
startTimeout
kicks in.When restoring, you should be able to reproduce.
Versions