~
• {err} (`table`) The error object
Return: ~
(`string`) error_message The formatted error message
notify({method}, {params}) *vim.lsp.rpc.notify()*
Sends a notification to the LSP server.
Parameters: ~
• {method} (`string`) The invoked LSP method
• {params} (`table?`) Parameters for the invoked LSP method
Return: ~
(`boolean`) `true` if notification could be sent, `false` if not
*vim.lsp.rpc.request()*
request({method}, {params}, {callback}, {notify_reply_callback})
Sends a request to the LSP server and runs {callback} upon response.
Parameters: ~
• {method} (`string`) The invoked LSP method
• {params} (`table?`) Parameters for the invoked LSP
method
• {callback} (`fun(err: lsp.ResponseError?, result: any)`)
Callback to invoke
• {notify_reply_callback} (`fun(message_id: integer)?`) Callback to
invoke as soon as a request is no longer
pending
Return (multiple): ~
(`boolean`) success `true` if request could be sent, `false` if not
(`integer?`) message_id if request could be sent, `nil` if not
*vim.lsp.rpc.rpc_response_error()*
rpc_response_error({code}, {message}, {data})
Creates an RPC response table `error` to be sent to the LSP response.
Parameters: ~
• {code} (`integer`) RPC error code defined, see
`vim.lsp.protocol.ErrorCodes`
• {message} (`string?`) arbitrary message to send to server
• {data} (`any?`) arbitrary data to send to server
Return: ~
(`lsp.ResponseError`)
See also: ~
• lsp.ErrorCodes See `vim.lsp.protocol.ErrorCodes`
start({cmd}, {dispatchers}, {extra_spawn_params}) *vim.lsp.rpc.start()*
Starts an LSP server process and create an LSP RPC client object to
interact with it. Communication with the spawned process happens via
stdio. For communication via TCP, spawn a process manually and use
|vim.lsp.rpc.connect()|
Parameters: ~
• {cmd}