Right now I run my vim environment in a docker container, I used to just use a script to initialize my vim environment but the subtle differences in how each distro and OS compiled vim had to many annoying little differences, and use it for Clojure development. As a part of my vim environment I use vim-fireplace. But when I am running my repl on my host machine, and vim in the docker container vim-fireplace is unable to establish a connection to my nrepl server. I get a connection refused error from vim-fireplace. I understand this is because vim-fireplace uses localhost for the host-ip by default. But even when I manually call
:Connect host_ip repl_port
It will say a connection was established, and ask me where to scope the connection to. But I am unable to run a command via cqc, or evaluate a block of text with :Eval, getting the same error that the connection was refused.
If I install Java and lein on the container, then I can connect to the repl server on the host machine via
lein repl :connect host_ip:repl_port
and execute commands as expected.
The plugin setup I currently use for vim works on the host machine without issue (connecting to fireplace and running commands).
Is there a way I can either alias my host machines lo0 adapter in docker so that I can connect to my repl via that interface, or a different solution? I'd like to avoid running java, lein, and the repl server in the container, so that I can keep it lean and more general purpose for other non Clojure development as well.