Skip to content

Commit 6766e2a

Browse files
committed
Update README for 0.1.0 changes
1 parent 1dea92f commit 6766e2a

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

README.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,7 @@
22

33
A 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
```
3521
NVIM_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

6352
This plugin stays running, and maintains state. Additionally, it shows how
6453
plugins 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

7665
https://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

project.clj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@
1515
[clojure-msgpack "1.2.0"]
1616
[uk.co.caprica/juds "0.94.1"]]
1717
:src-paths ["src" "test"]
18-
:repl-options {:init-ns neovim-client.nvim}
1918
:target-path "target/%s")

src/neovim_client/1/api/buffer_ext.clj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
(defn get-lines-async
99
[nvim buffer start end f]
1010
(api.buffer/get-lines-async nvim buffer start end false f))
11+
12+
(defn set-lines
13+
[nvim buffer start end lines]
14+
(api.buffer/set-lines nvim buffer start end false lines))

0 commit comments

Comments
 (0)