package vcaml

Not available on OCaml 5.5
  1. Overview
  2. Docs

Description

VCaml provides OCaml bindings for Neovim's and models some of Neovim's more tricky semantics so plugin authors do not need to consider them when writing plugins. Plugins communicate with Neovim remotely over Msgpack RPC (see :h api for details).

Added to opam-repository:

README

VCaml

A library for building Neovim plugins in OCaml.

Reviewing

Most of this library is a direct port of the neovim remote API. For review, consult the following help pages:

  • :help api.txt
  • :help msgpack-rpc
  • :help --embed
  • :help --headless
  • :help --listen

Structure

Almost all of the functions in the library are small idiomatic shims on top of the auto-generated functions produced by lib/neovim_api_wrapper Those that have not been tested are in Untested submodules.

VCaml

  • Library entrypoint
  • API type definitions

    • OCaml -> Neovim: Defun.Vim.t
    • Neovim -> OCaml: Defun.Ocaml.t
    • These types can't be unified for deep GADT reasons.

Api_call

  • A type that represents an API call that can be executed
  • A let-syntax for combining these types

Nvim

  • Functions that operate on global Neovim state

Buffer

  • Functions that operate on Neovim buffers

Window

  • Functions that operate on Neovim windows

Tabpage

  • Functions that operate on Neovim tabpages

Ui

  • Functions that operate on the Neovim UI

Client

  • Client.t is opaque to library users. You can interact with clients via the interface exposed in [Vcaml], but for the most part it is an opaque object that is just passed to functions that need it.

Client_info

  • Client_info.t is some data that is present for every plugin, embedder, or UI that is attached to Neovim.

Keymap

  • A type for representing key mappings

Command

  • A type for representing commands (e.g. ":Foo")

Color

  • Types for representing colors and highlights

Mark

  • A type for representing a mark (e.g. "'m")

Mode

  • A type for representing a mode (e.g. "Normal")

Transport

  • Generic code for setting up communication between OCaml and Neovim

Extract

  • Utilities for pulling values out of VCaml related msgpack objects.

Notifier

  • Functions that let you send Neovim asynchronous notifications. In most cases this isn't something you want to do: normally you only want to (1) send synchronous requests & responses back and forth, and (2) receive asynchronous notifications.

Dependencies (16)

  1. faraday
  2. dune >= "2.0.0"
  3. angstrom-async >= "0.15.0"
  4. angstrom >= "0.15.0"
  5. textutils >= "v0.16" & < "v0.17"
  6. semantic_version >= "v0.16" & < "v0.17"
  7. ppx_optcomp >= "v0.16" & < "v0.17"
  8. ppx_jane >= "v0.16" & < "v0.17"
  9. man_in_the_middle_debugger >= "v0.16" & < "v0.17"
  10. jsonaf >= "v0.16" & < "v0.17"
  11. expect_test_helpers_async >= "v0.16" & < "v0.17"
  12. core_unix >= "v0.16" & < "v0.17"
  13. core_kernel >= "v0.16" & < "v0.17"
  14. core >= "v0.16" & < "v0.17"
  15. async >= "v0.16" & < "v0.17"
  16. ocaml >= "4.14.0" & < "5.1"

Dev Dependencies

None

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building vcaml with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
v0.16.0 (this version) n/a good n/a n/a n/a
v0.15.0 good good n/a n/a n/a
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure