/neovim-java

Neovim Java client library. Provides multiple interfaces for communicating with Neovim instance via multiple different protocols. - Moved to https://codeberg.org/neovim-java/neovim-java

Primary LanguageJavaMIT LicenseMIT

neovim-java

CI Maven Central Sonatype Nexus (Snapshots) javadoc

Neovim Java client

Consists of following modules:

  • Core RPC javadoc - core of the library providing most basic interface for communicating with Neovim - it can be used without other modules, but other modules are recommended for most uses
  • Reactive Core RPC javadoc - simple wrapper around Core RPC module for providing a reactive interface
  • Unix Socket Connection javadoc - simple addition of another RPCConnection for using unix domain sockets
  • Neovim API javadoc - main interface for communicating with neovim. This is the recommended module to use, it provides a reactive interface and greatly simplified interface, providing complete implementations for all functions provided by Neovim.
  • Neovim Rx API javadoc - small wrapper around Neovim API providing RxJava2 interface instead of Java reactive interface
  • Handler annotations javadoc - addition allowing creation of annotation based handlers for requests and notifications
  • Neovim notifications javadoc - addition allowing usage of notifications through Java 9 Flows interface and also provides data models for all neovim notifications
  • API Explorer javadoc - simple JavaFX application used for testing library and exploring neovim API
  • Plugin host javadoc - library for building remote plugins - this should be the main dependency when developing Neovim plugins (either standalone or hosted by plugins-common-host) - enables easy usage with neovim-java-plugin-host
  • Plugins common host javadoc - executable which can be used as a remote plugin in Neovim, which should load all other plugins from classpath (provided by neovim-java-plugin-host)

Many features are not completely tested and this library was mostly built to experiment with Neovim RPC API, but there should be no issues with using this library.

To include this library right away and start working with Neovim, Neovim API is enough.

Include it in your dependencies: Maven(Neovim API):

<dependency>
  <groupId>com.ensarsarajcic.neovim.java</groupId>
  <artifactId>neovim-api</artifactId>
  <version>${neovimjava.version}</version>
</dependency>

Gradle(Neovim API):

compile 'com.ensarsarajcic.neovim.java:neovim-api:${neovimjava.version}'

Or if you prefer RxJava2, use Neovim Rx API: Maven(Neovim Rx API):

<dependency>
  <groupId>com.ensarsarajcic.neovim.java</groupId>
  <artifactId>neovim-rx-api</artifactId>
  <version>${neovimjava.version}</version>
</dependency>

Gradle(Neovim Rx API):

compile 'com.ensarsarajcic.neovim.java:neovim-rx-api:${neovimjava.version}'

If you wish to use latest SNAPSHOT version, it is available in Sonatype snapshots repository.

For more information, check out README of modules you are interested in.

Remote plugin support

This repository contains a small remote plugin example in rplugin-example. To run this example run mvn package and run Neovim with provided vimrc by calling nvim -u rplugin-example/vimrc from project root.

It should be possible to then call the :NeovimJavaIncrementCount command which communicated with java plugin.

It is an example of a standalone rplugin which should provide its own configuration.

rplugin-hosted-example is an example of a hosted plugin which can be easily loaded with neovim-java-plugin-host

Contributing

Check out contributing guidelines.

License

MIT