refactor(lsp): no longer rely on LspDetach for detaching capabilities

This commit is contained in:
Yi Ming
2025-07-21 17:57:01 +08:00
parent b3fbc8d6fa
commit 2ace4089f8
2 changed files with 18 additions and 11 deletions

View File

@@ -60,17 +60,6 @@ function M:new(bufnr)
})
self.client_state = {}
api.nvim_create_autocmd('LspDetach', {
group = self.augroup,
buffer = bufnr,
callback = function(args)
self:on_detach(args.data.client_id)
if next(self.client_state) == nil then
self:destroy()
end
end,
})
Class.active[bufnr] = self
return self
end