VcamlSourcemodule Unshadow_buffer := Buffermodule Unshadow_command := CommandClient_info is present for every remote, ui, embedder, host, or plugin attached to neovim.
API version for which this library is built (not the same as the Neovim version).
Msgpack.pp with support for Neovim Msgpack extensions.
A 'a Api_call.t is a thunked call to neovim returning a Msgpack-encoded 'a. No RPC traffic is generated until an Api_call.t is invoked via run or run_join.
val run :
Core.Source_code_position.t ->
[ `connected ] Client.t ->
'a Api_call.t ->
'a Async.Deferred.Or_error.tval run_join :
Core.Source_code_position.t ->
[ `connected ] Client.t ->
'a Api_call.Or_error.t ->
'a Async.Deferred.Or_error.tval wrap_viml_function :
type_:('fn, 'leftmost, 'out) Defun.Vim.t ->
function_name:string ->
'fnGiven the name of a function available in Vimscript (VimL) along with its arity (see Defun.Vim), return a regularly-typed OCaml function that calls said function.
This is intended for client authors to delegate work back to Neovim, possibly to call an existing Vimscript function. Before reaching for this function, please check the functions available in Nvim, Buffer, Window and Tabpage to see that the functionality you intend to wrap isn't directly exposed in the API.
val register_request_blocking :
_ Client.t ->
name:string ->
type_:('fn, 'leftmost) Defun.Ocaml.Sync.t ->
f:
(keyboard_interrupted:unit Async.Deferred.t ->
client:[ `connected ] Client.t ->
'fn) ->
unitregister_request_blocking and register_request_async register functions that can be called from Neovim via rpcrequest and rpcnotify respectively. This is achieved by adding a listener to the Neovim msgpack_rpc bus.
A blocking request will block Neovim from processing user input or communication over other channels until a response is returned. Neovim will continue to process calls sent over the same channel while a blocking request is in flight, which means nested calls are supported.
When the user presses Ctrl-C to interrupt a blocking call, keyboard_interrupted will be determined. Use that to run any necessary cleanup. If you call back into Neovim during the blocking RPC, consider whether a keyboard interrupt should prevent those calls from being run.
An async request will enqueue logic on Neovim's event loop instead of blocking. Importantly, the state of the editor may have changed between the time the async request was made and the time Neovim process any of its logic.
val register_request_async :
_ Client.t ->
name:string ->
type_:'fn Defun.Ocaml.Async.t ->
f:(client:[ `connected ] Client.t -> 'fn) ->
unit