File tree 3 files changed +18
-2
lines changed
3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1
- (defproject neovim-client " 0.1.1 "
1
+ (defproject neovim-client " 0.1.2 "
2
2
:description " Client library for the Neovim RPC API"
3
3
:url " https://github.com/clojure-vim/neovim-client"
4
4
:license {:name " Eclipse Public License"
Original file line number Diff line number Diff line change 20
20
(string/join " \n " (api.buffer-ext/get-lines
21
21
nvim (api/get-current-buf nvim) 0 -1 )))
22
22
23
+ (defn get-current-buffer-text-async
24
+ " Convenience function to get the current buffer's text asynchronously."
25
+ [nvim f]
26
+ (api/get-current-buf-async
27
+ nvim
28
+ (fn [buf]
29
+ (api.buffer-ext/get-lines-async
30
+ nvim buf 0 -1
31
+ (fn [lines] (f (string/join " \n " lines)))))))
32
+
23
33
(defn get-current-word-async
24
34
" Get the current word asynchronously."
25
35
[nvim f]
34
44
#(api.window/get-buf nvim %))
35
45
(api/list-wins nvim))]
36
46
((set visible-buffers) buffer-name))))
47
+
48
+ (defn set-current-buffer-text
49
+ " Sets the current buffer's contents."
50
+ [nvim text]
51
+ (api.buffer-ext/set-lines
52
+ nvim (api/get-current-buf nvim) 0 -1 (string/split-lines text)))
Original file line number Diff line number Diff line change 24
24
(is (thrown-with-msg?
25
25
Throwable
26
26
#"version not supported"
27
- (client.nvim/new* 2 in out false )))))
27
+ (client.nvim/new* Integer/MAX_VALUE in out false )))))
28
28
29
29
(with-neovim
30
30
(let [{:keys [in out]} *neovim*]
You can’t perform that action at this time.
0 commit comments