File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 5
5
[clojure.core.async :as async]
6
6
[clojure.java.io :as io]
7
7
[clojure.string :as string]
8
+ [clojure.tools.namespace.find :as namespace.find]
8
9
[clojure.tools.logging :as log]
9
10
[neovim-client.1.api :as api]
10
11
[neovim-client.1.api.buffer :as api.buffer]
231
232
(log/info (:val res))
232
233
(.close res-chan))))))))
233
234
235
+ (nvim/register-method!
236
+ nvim
237
+ " eval-buffer-ns"
238
+ (run-command
239
+ plugin
240
+ (fn [msg]
241
+ (let [buffer-name (api/get-current-buf nvim)
242
+ file-name (api.buffer/get-name nvim buffer-name)
243
+ file (io/file file-name)
244
+ namespace-declarations (namespace.find/find-ns-decls-in-dir file)]
245
+ (async/>!! (socket-repl/input-channel socket-repl) (first namespace-declarations))))))
246
+
234
247
(nvim/register-method!
235
248
nvim
236
249
" show-log"
You can’t perform that action at this time.
0 commit comments