feat(lsp)!: remove client-server handlers from vim.lsp.handlers

- Partition the handlers in vim.lsp.handlers as:
  - client to server response handlers (RCS)
  - server to client request handlers (RSC)
  - server to client notification handlers (NSC)

  Note use string indexes instead of protocol.methods for improved
  typing in LuaLS (tip: use hover on RCS, RSC or NSC).
This commit is contained in:
Lewis Russell
2024-10-29 09:36:02 +00:00
committed by Lewis Russell
parent f54266dbed
commit 9b357e30fd
14 changed files with 409 additions and 471 deletions

View File

@@ -261,7 +261,7 @@ end
---@param err lsp.ResponseError?
---@param result lsp.CodeLens[]
---@param ctx lsp.HandlerContext
function M.on_codelens(err, result, ctx, _)
function M.on_codelens(err, result, ctx)
if err then
active_refreshes[assert(ctx.bufnr)] = nil
log.error('codelens', err)