Skip to content

Commit 8935623

Browse files
committed
Add repl debugging scripts
1 parent 4d06a81 commit 8935623

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/user.clj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(ns user
2+
(:require
3+
[neovim-client.nvim :as nvim]))
4+
5+
(defn go
6+
"Start the plugin."
7+
[]
8+
(nvim/connect! "localhost" 7777))

tmux-run-dev.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Development run script #
2+
3+
# Generate .classpath from Leiningen if project.clj has changed.
4+
if [[ project.clj -nt .classpath ]]; then
5+
lein classpath > .classpath
6+
fi
7+
8+
tmux new-window -n 'nvim-debug'
9+
tmux send-keys "NVIM_LISTEN_ADDRESS=127.0.0.1:7777 nvim" C-m
10+
tmux split
11+
tmux send-keys 'java -cp "$(cat .classpath)" clojure.main' C-m
12+
tmux send-keys '(println "Plugin repl connecting to nvim")' C-m
13+
tmux send-keys '(go)' C-m

tmux-show-logs.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tmux new-window -n "nvim logs"
2+
tmux send-keys "tail -f ~/.nvimlog" C-m
3+
tmux split
4+
tmux send-keys "tail -f /tmp/nvim-clojure.log" C-m

0 commit comments

Comments
 (0)