2
2
3
3
A client library for creating Neovim plugins written in Clojure.
4
4
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 )
20
6
21
7
## Dependencies
22
8
@@ -33,19 +19,22 @@ Launch Neovim, explicitly setting the `NVIM_LISTEN_ADDRESS`
33
19
34
20
```
35
21
NVIM_LISTEN_ADDRESS=127.0.0.1:7777 nvim
22
+
36
23
```
37
24
38
- From repository:
25
+ From the repository director :
39
26
40
27
```
41
28
$> 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!'")
45
32
...
46
33
```
47
34
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.
49
38
50
39
### Examples
51
40
@@ -62,7 +51,7 @@ runtimepath^=~/.vim/bundle/sample-plugin` to `.vimrc`.
62
51
63
52
This plugin stays running, and maintains state. Additionally, it shows how
64
53
plugins are actually servers, which Neovim can make requests to via
65
- rpcrequest ().
54
+ rpcnotify ().
66
55
67
56
```
68
57
:echo SamplePluginCount()
@@ -75,6 +64,31 @@ Clojure socket repl.
75
64
76
65
https://github.com/jebberjeb/clojure-socketrepl.nvim
77
66
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
+
78
92
## Future
79
93
80
94
### Tighter Integration with Neovim
0 commit comments