vim

For discussion on all things (neo)vim.
lispyclouds 2020-06-25T10:23:10.231100Z

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!

2020-06-27T22:54:00.245100Z

\o/

2020-06-25T12:52:59.231400Z

may be @liquidz.uo can help?

1
2020-06-25T13:12:52.231500Z

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

2020-06-25T13:39:52.231800Z

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.

walterl 2020-06-25T13:45:53.234100Z

@chase-lambert @dominicm @noisesmith Re q and &lt;C-c&gt; doing nothing in pager mode: I happened upon a reproducible example: :lua print(vim.inspect(vim)). &lt;C-d&gt; displays menu (`-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit`), but q just scrolls down a page. Weird.

lispyclouds 2020-06-25T15:16:14.234200Z

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

dominicm 2020-06-25T17:42:06.235100Z

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

2020-06-25T17:47:08.235400Z

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

Chase 2020-06-25T17:48:27.235900Z

I'm using neovim...

2020-06-25T17:54:04.236300Z

in that case it may be version related?

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

Chase 2020-06-25T17:56:10.236800Z

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

Chase 2020-06-25T17:56:23.237Z

maybe. Not a huge deal

Chase 2020-06-25T17:57:06.237400Z

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

Chase 2020-06-25T17:59:44.237900Z

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

dave 2020-06-25T18:10:06.238700Z

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 🙂

dave 2020-06-25T18:10:59.239Z

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

2020-06-25T18:18:21.240500Z

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

2020-06-25T18:18:51.241100Z

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

2020-06-25T18:19:20.241700Z

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

dominicm 2020-06-25T20:06:07.241800Z

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?

dave 2020-06-25T20:08:09.242600Z

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

dave 2020-06-25T20:08:21.242900Z

i could probably get that to happen in clojure

dave 2020-06-25T20:08:41.243200Z

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

dominicm 2020-06-25T20:12:36.244300Z

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

dave 2020-06-25T20:12:52.244500Z

nice! i'll have a look

2020-06-25T21:36:04.244600Z

> 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