GithubHelp home page GithubHelp logo

mirca / vcaml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from janestreet/vcaml

0.0 1.0 0.0 384 KB

OCaml bindings for the Neovim API

License: MIT License

Makefile 0.05% OCaml 99.09% Standard ML 0.34% Vim Script 0.52%

vcaml's Introduction

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.

vcaml's People

Contributors

aalekseyev avatar xclerc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.