Fork me on GitHub
#vim
<
2020-06-25
>
lispyclouds10:06:10

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!

uochan13:06:52

@U7ERLH6JX 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 ...

uochan13:06:52

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
## 

$ 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.

lispyclouds15:06:14

Thanks a lot @liquidz.uo I missed the connect broweser step and it does work indeed 😄 😄 The exited cljs thing comes but works!

uochan21:06:04

> I'll look into the Exited CLJS session. You are now in CLJ again messages tomorrow. @U7ERLH6JX I have a fix in the dev branch

sogaiu12:06:59

may be @liquidz.uo can help?

thanks3 1
walterl13:06:53

@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.

dominicm17:06:06

@clojurians-slack100 interesting. I guess this should be reported upstream

noisesmith17:06:08

FWIW neovim handles that just fine (yet another reason to switch!)

Chase17:06:27

I'm using neovim...

noisesmith17:06:04

in that case it may be version related?

:version                                                                                                                                                                                                                                                                                                                                                                                                               
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5

Chase17:06:10

NVIM v0.5.0-504-g55b62a937 Build type: Release LuaJIT 2.1.0-beta3

Chase17:06:23

maybe. Not a huge deal

Chase17:06:06

Maybe something funny in my init.vim but I can't think of anything.

Chase17:06:44

offshoot question. If I build nvim from source like I did, how do I ever upgrade it?

dave18:06:06

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 🙂

dave18:06:59

i'm not sure what the equivalent is if you're on macOS or something else besides debian/ubuntu

noisesmith18:06:21

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

noisesmith18:06:51

for just "check out source and make install" the upgrade path is to pull from upstream and make install again

noisesmith18:06:20

maybe if you are lucky there was an "uninstall" target in case the old version had resources the new one doesn't use...

dominicm20:06:07

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?

dave20:06:09

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

dave20:06:21

i could probably get that to happen in clojure

dave20:06:41

what's the interface like? can you run arbitrary code?

dominicm20:06:36

@dave yep. You can use -e or -i, check the clojure.main help :)

dave20:06:52

nice! i'll have a look