Hello! Has anyone here tried setting up shadow-cljs
with vim-iced
?
I followed the instructions here at https://liquidz.github.io/vim-iced/#clojurescript_shadow_cljs
the REPL started up in the terminal and vim seems to connect to it fine.
When I run the command IcedStartCljsRepl shadow-cljs {YOUR-BUILD-ID}
as mentioned in the doc, I get a message saying Exited CLJS session. You are now in CLJ again
Then when i try to eval something it says No available JS runtime.
Im a js ecosystem noob here and im kinda lost as to where to debug this 😞 any pointers appreciated!
\o/
may be @liquidz.uo can help?
@rahul080327 What is your build target?
https://shadow-cljs.github.io/docs/UsersGuide.html#_build_target
If :browser
, you need to access HTTP server launched by shadow-cljs before executing :IcedStartCljsRepl
.
BTW, Exited CLJS session. You are now in CLJ again
should not be a vim-iced's message ...
Ah, I could reproduce Exited CLJS session. You are now in CLJ again
message, but I also confirm to work correctly.
$ lein new shadow-cljs your-project +reagent
$ cd your-project
## modify :dependencies and :nrepl setting
$ vim shadow-cljs.edn
$ npm install
$ npx shadow-cljs watch app
## you need to access the following URL
## <http://localhost:8700>
$ vim src/your_project/core.cljs
# execute :IcedConnect
# execute :IcedStartCljsRepl shadow-cljs app
I'll look into the Exited CLJS session. You are now in CLJ again
messages tomorrow.@chase-lambert @dominicm @noisesmith Re q
and <C-c>
doing nothing in pager mode: I happened upon a reproducible example: :lua print(vim.inspect(vim))
. <C-d>
displays menu (`-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit`), but q
just scrolls down a page. Weird.
Thanks a lot @liquidz.uo I missed the connect broweser step and it does work indeed 😄 😄 The exited cljs thing comes but works!
@clojurians-slack100 interesting. I guess this should be reported upstream
FWIW neovim handles that just fine (yet another reason to switch!)
I'm using neovim...
in that case it may be version related?
:version
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
NVIM v0.5.0-504-g55b62a937 Build type: Release LuaJIT 2.1.0-beta3
maybe. Not a huge deal
Maybe something funny in my init.vim but I can't think of anything.
offshoot question. If I build nvim from source like I did, how do I ever upgrade it?
i'm on ubuntu 16.04 and i use the neovim unstable PPA. i recommend it, i haven't noticed hardly any breakage. it's pretty darn stable as far as unstable branches of development go 🙂
i'm not sure what the equivalent is if you're on macOS or something else besides debian/ubuntu
there might be an unstable cask for homebrew (I use the normal homebrew neovim, and am up to date)
% brew upgrade neovim
Updating Homebrew...
Warning: neovim 0.4.3 already installed
for just "check out source and make install" the upgrade path is to pull from upstream and make install again
maybe if you are lucky there was an "uninstall" target in case the old version had resources the new one doesn't use...
Just pushed an update to vim-jack-in that allows for passing init-opts. I'm using it to monkeypatch functions in nrepl, and also to load @gfredericks' dot-slash-2 with some custom utilities. Curious to know if anyone else has an init.clj they use?
oh, that sounds like it might get me to use jack-in again! my blocker is that i have to run a command that sets up a bunch of environment variables (fetching values from S3, etc.) in my terminal session before i start my repl
i could probably get that to happen in clojure
what's the interface like? can you run arbitrary code?
@dave yep. You can use -e or -i, check the clojure.main help :)
nice! i'll have a look
> I'll look into the Exited CLJS session. You are now in CLJ again messages tomorrow.
@rahul080327 I have a fix in the dev
branch