(`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} (`string[]`) Command to start the LSP server.
• {dispatchers} (`table?`) Dispatchers for LSP message types.
• {notification}
(`fun(method: string, params: table)`)
• {server_request}
(`fun(method: string, params: table): any?, lsp.ResponseError?`)
• {on_exit}
(`fun(code: integer, signal: integer)`)
• {on_error} (`fun(code: integer, err: any)`)
• {extra_spawn_params} (`table?`) Additional context for the LSP server
process.
• {cwd}? (`string`) Working directory for the
LSP server process
• {detached}? (`boolean`) Detach the LSP server
process from the current process
• {env}? (`table<string,string>`) Additional
environment variables for LSP server process.
See |vim.system()|
Return: ~
(`vim.lsp.rpc.PublicClient`) See |vim.lsp.rpc.PublicClient|.
==============================================================================
Lua module: vim.lsp.protocol *lsp-protocol*
*vim.lsp.protocol.make_client_capabilities()*
make_client_capabilities()
Gets a new ClientCapabilities object describing the LSP client
capabilities.
Return: ~
(`lsp.ClientCapabilities`)
Methods *vim.lsp.protocol.Methods*
LSP method names.
See also: ~
• https://microsoft.github.io/language-server-protocol/specification/#metaModel
*vim.lsp.protocol.resolve_capabilities()*
resolve_capabilities({server_capabilities})
Creates a normalized object describing LSP server capabilities.
Parameters: ~
• {server_capabilities} (`table`) Table of capabilities supported by
the server
Return: ~
(`lsp.ServerCapabilities?`) Normalized table of capabilities
vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl: