This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-26
Channels
- # announcements (4)
- # babashka (8)
- # beginners (75)
- # calva (26)
- # cider (33)
- # circleci (5)
- # clojure (36)
- # clojure-dev (2)
- # clojure-europe (25)
- # clojure-nl (4)
- # clojure-spec (38)
- # clojure-uk (47)
- # clojurescript (15)
- # cloverage (2)
- # conjure (64)
- # core-async (41)
- # cursive (13)
- # data-science (2)
- # datalog (16)
- # datascript (22)
- # datomic (9)
- # duct (2)
- # emacs (81)
- # figwheel-main (1)
- # fulcro (4)
- # jobs (2)
- # jobs-discuss (29)
- # kaocha (3)
- # meander (11)
- # membrane (21)
- # off-topic (1)
- # portal (1)
- # re-frame (1)
- # reitit (1)
- # releases (2)
- # remote-jobs (31)
- # shadow-cljs (26)
- # specter (5)
- # sql (26)
- # tools-deps (19)
- # vim (12)
I have almost everything working with conjure and neovim. I am stuck on using vim-jack-in
from within Neovim. It starts a repl but I am stuck in the REPL log and cannot run any commands. Is this a bug or am I missing something.
Running a REPL on the command line and then opening a Clojure file with nvim correctly connects to a running repl, so it only seems vim-jack-in approach is not working for me.
That'll probably be because you're in the "terminal" mode, which is different to insert and normal.
Yes, it says Terminal at the bottom
It's a bit jarring at first though if you don't know about terminal mode, I was never a fan of that default 😕
After using Spacemacs I shoud remap Esc
to fd
- is that in your Github config?
(noremap :i :jk :<esc>)
(noremap :c :jk :<c-c>)
(noremap :t :jk :<c-\><c-n>)
it's in fennel but you can translate that to viml easily enoughI find the localleader key combos quick to timeout, so fail because I am typing to slowly. Is there a way to increase that timeout? Or do I just need to type faster 🙂
*'timeoutlen'* *'tm'*
'timeoutlen' 'tm' number (default 1000)
global
Time in milliseconds to wait for a mapped sequence to complete.
*'ttimeoutlen'* *'ttm'*
'ttimeoutlen' 'ttm' number (default 50)
global
Time in milliseconds to wait for a key code sequence to complete. Also
used for CTRL-\ CTRL-N and CTRL-\ CTRL-G when part of a command has
been typed.
I can escape from the terminal, after running :Clj
command in neovim (on a Clojure file) and use :first
to switch back to the code buffer.
However, when evaluating the popup says no connection.
Opening the log with`, l v` says no nREPL port file found.
Using top in a separate terminal, a java process is started by :Clj
in neovim. So seems conjure is not connecting to the repl vim-jack-in starts.
gt
works, thanks.
An .nrepl-port file was created with a timestamp of when I ran the :Clj
command.
This part will be automatic soon (™️), so when you eval it'll try to find a .nrepl-port
file, but I haven't added that just yet I'm afraid.
Success.. I have a Tonkinese cat 🙂
Its no different to the early days of Calva and Cider 🙂
It's automatic as you open your first Clojure file but that's all right now. On eval will be the next step
I sometimes get the error E5601: Cannot close window, only floating window would remain
and cant close neovim
gt
will get rid of it, so it seems to be that the popup isnt going away by itself when I use :Clj
Switching tabs is refreshing the source code buffer I assume and forcing the floating window to go
Yes, just noticed that 🙂
That makes sense. Works just like cider inline eval results
Thanks for your help with this, much appreciate.
Yep, supposed to be an equivalent but with multiline, history, highlighting and editable
And you're more than welcome, I want to give you a decent experience and learn where the pain points are
:q
when the popup is still displayed should give you the error under the neovim status bar
I updated my notes on https://gist.github.com/jr0cket/6c475137ee57fbb14f9289bd76889512
I'll add a nicer version of the write-up to http://practicalli.github.io/clojure/clojure-editors/ and as I'll be doing a lot of videos for the next few months, I'll add a walk-through video of Conjure too (using your ascii cinema syntax guide as inspiration)
The biggest challenge is yet to come though... deciding on a theme and statusbar theme 🙂
I had a look into the bug you mentioned but it looks like it's a neovim bug! https://github.com/neovim/neovim/issues/11440
You can avoid it by either closing the HUD first or using :tabclose
instead. It only happens when closing tabs with floating windows pinned to them. I can't think of a workaround right now 😭 it think it needs to be fixed in nvim.
And a possible fix incoming https://github.com/neovim/neovim/pull/11938 - there's a PR anyway
I can just move the cursor too 🙂 I was only really experiencing that issue when I didn't have things working and I was restarting neovim all the time. But good to know as I am sure I'll experience it again on occasion. Thank you.
I'll spend a bit of time over the weekend getting a bit more comfortable using Neovim and absorbing the Conjure commands. I didnt see a way to evaluate an expression and have the result printed as a comment. Is that part of Conjure? I can raise a feature request if not. I use that a lot in my broadcasts 🙂
I did notice the REPL log used more with Conjure (I usually have that hidden in Spacemacs), so maybe that workflow would work just as well. Will let you know.
Yeah, the log would be the first place I'd go to. All results are placed in your c
register by default (I've configured mine to go to my default register so I can just hit p
after an eval to get the result)
You can evaluate something then press "cp
to paste the result wherever you want. Or even <c-r>c
while in insert mode.
I have all this neovim magic to learn, thanks 🙂
The only other thing I'd pile on that you may want to check out:
* Set an uppercase mark (uppercase go across files and persist between nvim restarts) with mF
on some form.
* Go to another part of the file or a different file entirely
* <prefix>emF
- see that marked form get evaluated!
Really handy for changing things in one area and repeatedly calling it from elsewhere.