package vcaml
OCaml bindings for the Neovim API
Install
Dune Dependency
Authors
Maintainers
Sources
vcaml-v0.15.0.tar.gz
sha256=0dbf2526a24d838988ae9a327550fdd9f0328dbdca9d026430fb4b579e0e0442
doc/vcaml.msgpack_rpc/Msgpack_rpc/index.html
Module Msgpack_rpc
Source
Implements the Msgpack RPC protocol. See https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md
Although you can still subscribe after the RPC is connected, note that if you do you may miss events sent before the subscription.
Source
val register_method :
_ t ->
name:Base.string ->
f:(Msgpack.t Base.list -> Msgpack.t Async_kernel.Deferred.Or_error.t) ->
[ `Ok | `Duplicate ]
Although you can still register methods after the RPC is connected, note that if clients call the method before registration they will see an error for an undefined method.
Source
val connect :
[ `not_connected ] t ->
Async.Reader.t ->
Async.Writer.t ->
close_reader_and_writer_on_disconnect:Base.bool ->
[ `connected ] t
Once connect
is called the counterparty can start calling methods and sending notifications. Any methods that should be callable at that time should be registered beforehand, as should any subscriptions to the event bus. Calling connect
twice will raise.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>