File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,10 @@ TODO alpha
3838 [_] demo video
3939 [X] architecture diagram
4040 nvim<--msgpack/stdio-->plugin(jar)<--localhost:5555-->socketrepl
41- [_ ] Error handle repl server not running
41+ [X ] Error handle repl server not running
4242 Connection localhost:3333
4343 Then trying an ,eb doesn't fail gracefully
4444 ->Exception in logs, current-connection still nil?
45- Add logging
4645 [_] Script debugging
4746 open nvim w/ NVIM_LISTEN_ADDRESS
4847 can we source debug vimscript from CLI?
Original file line number Diff line number Diff line change 8989 []
9090 (swap! current-connection assoc :last (System/currentTimeMillis )))
9191
92+ (defn connected-to-socket-repl?
93+ " Returns true if currently connected to a socket repl server."
94+ [connection]
95+ ; ; Choose one of the properties set by establishing the connection.
96+ (:host connection))
97+
9298(defn warn-if-disconnect*
93- [connection f]
99+ [connection-atom f]
94100 (fn [msg]
95- (if-not @connection
101+ (if-not ( connected-to-socket-repl? @connection-atom)
96102 (nvim/vim-command-async
97103 " :echo 'Use :Connect host:port to connect to a socket repl'"
98104 (fn [_]))
122128 `handler` is a function which accepts one string argument."
123129 [host port handler]
124130 (let [conn (connection host port)
125- chan (async/chan 10 )
131+ chan (async/chan 1024 )
126132 file (output-file )]
127133 (reset! current-connection
128134 (assoc conn
You can’t perform that action at this time.
0 commit comments