Hi, I've recently started to try and use Conjure again, I'm starting from a pretty clean setup and getting an error when running :ConjureSchool
:
E5108: Error executing lua ...markwoodhall/.vim/plugged/conjure/lua/conjure/school.lua:65: attempt to concatenate a nil value
OH NO I know what that is, I recommend v3.5.0 for a little while if you’d like to use the school.
I just need to update it to use the new config system in v4. I knew I’d miss something!
Ok, thanks. I can do without the school for now. Everything else is working, I was just interested to see what it might teach me.
Yeah, it’ll work on 3.5.0, I just updated how the config works to make it just like every other vim plugin, no magic or new concepts.
The one thing I forgot to update was the school 🙃 I’ll add a canary test for it too I think
I’ll get it fixed ASAP.
Great, thanks! No hurry.
does conjure rely on cider-nrepl
?
Only for autocomplete and go to def right now but nREPL 0.8 should provide those things (in a simpler form) out of the box I think.
👍 thanks
And I’m going to add fallback attempts for go to def soon, so it’ll try it’s best if you don’t have CIDER.
The idea is to not require it for the essentials but it’s an optional upgrade if you want fancier features. Rather than me writing big hacky versions of what CIDER does really well.
I’ve been enjoying https://github.com/clojure-vim/vim-jack-in for booting a fully CIDERed REPL.
Is that required if you have a repl already running?
and do you have the radenlign/vim-dispatch-neovim
installed too?
Nope, that starts your REPL + CIDER a la, CIDER jack in.
I do, yep
If you have a REPL already, stick with that 😄
and vim-dispatch by tpope?
Yeah, I installed all three from the readme
kk
curious.
thanks 🙂
I think the first two are required and the neovim one is just a bridge of sorts? It shims some things in?>
> Note: This plugin depends on dispatch.vim and you need to have that plugin installed for this plugin to work From vim dispatch neovim
fwiw, I don't use the neovim dispatch anymore. I wrote an integration with dispatch & kitty
that way I can close vim and open it again without losing my REPL
Oh that’s neat. I mostly just start another repl in another terminal.
I use kitty so maybe I should explore that too
" plugin/kitty.vim
if exists('g:loaded_dispatch_kitty')
finish
endif
let g:loaded_dispatch_kitty = 1
augroup kitty-dispatch-neovim
autocmd!
autocmd VimEnter *
\ if index(get(g:, 'dispatch_handlers', ['kitty']), 'kitty') < 0 |
\ call insert(g:dispatch_handlers, 'kitty', 0) |
\ endif
augroup END
and
" autoload/dispatch/kitty.vim
if exists('g:autoloaded_dispatch_kitty')
finish
endif
let g:autoloaded_dispatch_kitty = 1
function! dispatch#kitty#handle(request) abort
if empty($KITTY_LISTEN_ON)
return 0
endif
if a:request.action ==# 'make'
" Using it for make is annoying (for now)
return 0
let command = dispatch#prepare_make(a:request)
elseif a:request.action ==# 'start'
let command = dispatch#prepare_start(a:request)
else
return 0
endif
if &shellredir =~# '%s'
let redir = printf(&shellredir, '/dev/null')
else
let redir = &shellredir . ' ' . '/dev/null'
endif
let kitty = 'kitty @ new-window --title='.shellescape(a:request.title).' '.'--cwd='.shellescape(a:request.directory)
if a:request.action ==# 'start'
let kitty .= ' --new-tab --tab-title='.shellescape(a:request.title)
endif
if a:request.background
let kitty .= ' --keep-focus'
endif
call system(kitty.' '.&shell.' '.&shellcmdflag.' '.shellescape(command).redir)
return !v:shell_error
endfunction
function! dispatch#kitty#activate(pid) abort
let out = system('ps ewww -p '.a:pid)
let listen_on = matchstr(out, 'KITTY_LISTEN_ON=\zs\S\+')
let call = 'kitty @ '
if !empty(listen_on)
let call .= '--to '. listen_on . ' '
endif
let call .= 'focus-window --match pid:'. a:pid
call system(call)
return !v:shell_error
endfunction
#!/usr/bin/env bash
socket="$(mktemp -u -p '' kitty_socket.XXXXXXXXX)"
kitty --listen-on "unix:${socket}" "$@"
Here's how I launch kitty to make that work (you need to enable remote control y'see)Hey I'm getting E121: Undefined variable: g:conjure#client#clojure#nrepl#eval#auto_require when trying to disable auto-require, I'm doing something wrong?
" Old conjure config
let g:conjure_config = {"mappings.doc-word": "K", "mappings.def-word": "gd", "clojure.nrepl/eval.auto-require?": v:false}
" New conjure config
let g:conjure#mapping#doc_word = "K"
let g:conjure#mapping#def_word = "gd"
let g:conjure#client#clojure#nrepl#eval#auto_require v:false
You just need an = between the name and the value I think?
uahauauh
yeap
sorry for that
Haha no problem! Did I miss it in some docs?
Commit for reference, if anyone need to update their conjure configs: https://github.com/rafaeldelboni/dotfiles/commit/cb5b188028a1a2e3723b7ba592a632b36713705d
The docs are great, btw