22
33A client library for creating Neovim plugins written in Clojure.
44
5- ## Neovim API Versions (Levels)
6-
7- Neovim's RPC API is
8- [ versioned separately] ( https://github.com/neovim/neovim/pull/5535 ) from
9- Neovim itslef, using a monotonically increasing integer. The API's version is
10- tracked using a value called ` api_level ` , which can be found by examining the
11- output of ` :echo api_info() ` .
12-
13- Currently, levels 0 - 1 are supported.
14-
15- In the future, this library can be updated to support a new level by:
16-
17- * Updating the API metadata ` $> nvim --api-info > resources/api-info.mp `
18-
19- * Generating code from the metadata using ` neovim-client.parser/generate `
5+ [ ![ Repling Neovim] ( http://img.youtube.com/vi/pCuEDiKXV5Q/0.jpg )] ( https://www.youtube.com/watch?v=pCuEDiKXV5Q )
206
217## Dependencies
228
@@ -33,19 +19,22 @@ Launch Neovim, explicitly setting the `NVIM_LISTEN_ADDRESS`
3319
3420```
3521NVIM_LISTEN_ADDRESS=127.0.0.1:7777 nvim
22+
3623```
3724
38- From repository:
25+ From the repository director :
3926
4027```
4128$> lein repl
42- neovim-client.nvim => (def c (new "localhost" 7777 ))
43- neovim-client.nvim => (require '[neovim-client.1.api :as api])
44- neovim-client.nvim => (api/command ":echo 'Hello Neovim!'")
29+ user => (def c (tcp-connection ))
30+ user => (require '[neovim-client.1.api :as api])
31+ user => (api/command ":echo 'Hello Neovim!'")
4532...
4633```
4734
48- [ ![ Repling Neovim] ( http://img.youtube.com/vi/g-9DdVwbSTo/0.jpg )] ( https://www.youtube.com/watch?v=g-9DdVwbSTo )
35+ Alternatively, if you've got tmux installed, you can use run the script
36+ ` ./tmux-run-dev.sh ` , which will start Neovim, a repl, and execute similar
37+ setup code.
4938
5039### Examples
5140
@@ -62,7 +51,7 @@ runtimepath^=~/.vim/bundle/sample-plugin` to `.vimrc`.
6251
6352This plugin stays running, and maintains state. Additionally, it shows how
6453plugins are actually servers, which Neovim can make requests to via
65- rpcrequest ().
54+ rpcnotify ().
6655
6756```
6857:echo SamplePluginCount()
@@ -75,6 +64,31 @@ Clojure socket repl.
7564
7665https://github.com/jebberjeb/clojure-socketrepl.nvim
7766
67+ ## Neovim API Versions (Levels)
68+
69+ Neovim's RPC API is
70+ [ versioned separately] ( https://github.com/neovim/neovim/pull/5535 ) from
71+ Neovim itslef, using a monotonically increasing integer. The API's version is
72+ tracked using a value called ` api_level ` , which can be found by examining the
73+ output of ` :echo api_info() ` .
74+
75+ Currently, levels 0 - 1 are supported.
76+
77+ In the future, this library can be updated to support a new level by:
78+
79+ * Updating the API metadata ` $> nvim --api-info > resources/api-info.mp `
80+
81+ * Generating code from the metadata using ` neovim-client.parser/generate `
82+
83+ ## Changes
84+
85+ ### Version 0.1.0
86+
87+ * Generate code for api_level 0 - 1 from metadata generated using Neovim
88+ version 0.2.0
89+ * Hand-written functions moved to ` -ext ` namespaces
90+ * Added unit tests which use ` nvim --embed ` process
91+
7892## Future
7993
8094### Tighter Integration with Neovim
0 commit comments