chore(lsp): remove capabilities sanitization (#17814)

* feat(lsp)!: remove capabilities sanitization

Users must now access client.server_capabilities which matches the same
structure as the protocol.

https://microsoft.github.io/language-server-protocol/specification

client.resolved_capabilities is no longer used to gate capabilities, and
will be removed in a future release.

BREAKING CHANGE


Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
This commit is contained in:
Michael Lingelbach
2022-04-30 02:22:30 -07:00
committed by GitHub
parent df09e03cf7
commit c618b314c6
8 changed files with 183 additions and 98 deletions

View File

@@ -385,7 +385,7 @@ local function start(cmd, cmd_args, dispatchers, extra_spawn_params)
---@param method (string) The invoked LSP method
---@param params (table) Parameters for the invoked LSP method
---@param callback (function) Callback to invoke
---@param notify_reply_callback (function) Callback to invoke as soon as a request is no longer pending
---@param notify_reply_callback (function|nil) Callback to invoke as soon as a request is no longer pending
---@returns (bool, number) `(true, message_id)` if request could be sent, `false` if not
local function request(method, params, callback, notify_reply_callback)
validate {