Skip to content

Commit 99a1501

Browse files
committed
Move plugin sub-component wiring to plugin start
1 parent 4a8fad4 commit 99a1501

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
-72 Bytes
Binary file not shown.

src/socket_repl/socket_repl_plugin.clj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@
7777

7878
(defn start
7979
[{:keys [debug nvim repl-log socket-repl code-channel] :as plugin}]
80+
81+
;; Wire sub-component io.
82+
(let [mult (async/mult code-channel)]
83+
(async/tap mult (socket-repl/input-channel socket-repl))
84+
(async/tap mult (repl-log/input-channel repl-log)))
85+
86+
;; Setup plugin functions.
8087
(nvim/register-method!
8188
nvim
8289
"connect"

src/socket_repl/system.clj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717
socket-repl (socket-repl/start (socket-repl/new))
1818
repl-log (repl-log/start (repl-log/new socket-repl))
1919
plugin (plugin/start (plugin/new debug nvim repl-log socket-repl))]
20-
21-
;; TODO - this feels like part of plugin startup, as it *has* to know
22-
;; about repl-log and socket-repl directly.
23-
(let [mult (async/mult (plugin/code-channel plugin))]
24-
(async/tap mult (socket-repl/input-channel socket-repl))
25-
(async/tap mult (repl-log/input-channel repl-log)))
26-
2720
{:nvim nvim
2821
:repl-log repl-log
2922
:socket-repl socket-repl

0 commit comments

Comments
 (0)