refactor(lsp): move util.enable to capability.enable

This commit is contained in:
Yi Ming
2025-07-21 13:10:54 +08:00
parent a37e101dc7
commit b3fbc8d6fa
6 changed files with 109 additions and 96 deletions

View File

@@ -209,8 +209,7 @@ local all_clients = {}
--- See [vim.lsp.ClientConfig].
--- @field workspace_folders lsp.WorkspaceFolder[]?
---
--- Whether linked editing ranges are enabled for this client.
--- @field _linked_editing_enabled boolean?
--- @field _enabled_capabilities table<vim.lsp.capability.Name, boolean?>
---
--- Track this so that we can escalate automatically if we've already tried a
--- graceful shutdown
@@ -436,6 +435,9 @@ function Client.create(config)
end,
}
---@type table <vim.lsp.capability.Name, boolean?>
self._enabled_capabilities = {}
--- @type table<string|integer, string> title of unfinished progress sequences by token
self.progress.pending = {}