Fork me on GitHub

@olical i gave conjure a try tonight and it's fantastic! excellent work. i'm excited to see how it develops in the future my custom conjure config, in case anyone is curious:

" => conjure
let g:conjure_log_direction = "horizontal"
let g:conjure_log_size_large = 100

augroup additional_conjure_bindings
  autocmd FileType clojure
        \ nnoremap <buffer> <localleader>ca
        \ :ConjureAdd {:tag :dev, :port 5555}<left>
  " press q to close the log buffer
  autocmd BufEnter /tmp/conjure.cljc nnoremap <buffer> q :ConjureCloseLog<CR>
augroup END
i found that the lower 25% of the screen is the perfect place for the output buffer, and i like being able to full-screen it (via <localleader>cl / :ConjureOpenLog) when i need to take a closer look i also like having a quick binding for :ConjureAdd with the usual arguments. i almost always just have a single prepl running on port 5555 for whatever project i'm working on, and if i ever need more, i have my keybinding set up to put the cursor right after the port, so i can backspace and make it 5556, etc. i also tend to add q bindings to most vim plugin-specific buffers, so i added one for conjure


Oh sweet! Thank you for giving it a go and the kind words! I still stick to my buffer on the right but I think that's out of habit at this point, I might start moving it to the bottom soon. That feature was contributed fairly recently so I haven't had a chance to play with it. Maybe I should make the zprint formatting width configurable too so you can keep more things on one line in horizontal mode :thinking_face: Interesting use of ConjureAdd too! I usually add local mappings to do the same with localvimrc. So I have ,ccX where X is a key of the prepl I want to connect to, ,cca for my API for example. Hopefully will replace most of this need but I guess I'll need a way to do it at runtime as well.


I probably wouldn't add q as a default binding although I like the idea. I might want macros in there 😄 I use the log buffer as a scratch / REPL buffer essentially.


i also hacked together a quick boot prepl task in my profile.boot, which is very handy for starting a prepl in the context of whatever boot project i'm working on. i'm linking it here in case anyone finds it useful:


Oh this is neat, maybe comment it on ? Could be a useful link from there.


good idea! i'll leave a comment


the next thing on my wishlist for conjure would be inline evaluation results in virtualtext, but i think even the way it is now, it's quite nice


That's near enough next up 😄 I experimented with virtual text for inline doc output, now I know how to use it. I'll probably only do it for single line output with no stdin/out though. If it doesn't look like it'll fit in that one line I'll open the log buffer for you. Edit: Basically the UX for the log buffer is shifting slightly to: Open it if the value doesn't fit nicely in one line without syntax highlighting. If there's more than one output or it spans multiple lines it'll open the log buffer. For the most basic repetitive interactions (evaluating a def or checking the order of args to a function) it shouldn't require a log buffer.


That sounds reasonable to me


Just added this to my ~/.lein/profiles.clj:

:injections [(defmacro def+
                       "binding => binding-form
                       internalizes binding-forms as if by def."
                       {:added "1.9", :special-form true, :forms '[(def+ [bindings*])]}
                       [& bindings]
                       (let [bings (partition 2 (destructure bindings))]
                         (sequence cat
                                    (map (fn [[var value]] `(def ~var ~value)) bings)
                                    [(mapv (fn [[var _]] (str var)) bings)]])))]}}
allowing me to use this mapping: nmap <LocalLeader>d v<M-e><M-e>"zy:let @z=substitute(@z, '\v(\n\|\s)+', ' ', 'g')<CR>cqc(user/def+ <C-R>z)<ESC><CR> to define bindings out of a let


Might be useful for someone; happy to hear better ways to get it done!


I use this to give me a subrepl in a context:


So if I'm in vim and eval a form containing (debug-repl), how do I return to vim with fireplace connected to that repl before it exits?


so, the evaluation context in fireplace changes. Then you can run (break!) to reutrn


(I linked the wrong one at first, so I changed the link)


Ah that link makes more sense, thanks 🙂


Does anyone know how to make the preview window bigger on vim, so that when doing deoplete and tabbing through the suggestions, it shows more than just the signature of the function and a snippet of the docstring, i.e.,


would really like to see more of that docstring 🙂


It didn't used to do that, I think it must be a deoplete option


I'm checking sources 😉


If you figure it out, let me know :)


It's hardcoded in vim (and neovim)


if you set previewheight=2, then you get two lines


but nothing above 3


Hmm, very odd. I could have sworn it used to be longer...


I remember it being quite annoying when something had a massive docstring

dominicm13:05:55 this doesn't seem to have the same problem (linked in deoplete)


Is floating window actually out yet? (I think it's in 0.4.0 actually...?)


oh man, that looks great


I've wanted to use floating windows for a while but didn't think it was in any released Neovim version. (log buffer is crying out for it)


Yeah, floating stuff isn't available yet, I have 0.3.7 of Neovim and no floaties for me!


Still, having a hard coded max of 3 lines for preview seems a bit archaic.


It's small so that it minimizes offset of the screen while typing (the thing that roxma is trying to fix with floats)


i'm using nvim 0.4.0-dev, and i don't see floating windows


granted, i'm not 100% sure when they are supposed to appear


when a plugin uses them :)


that float window looks great


I look forward to it


I built nvim from source and am on 0.4.0 and definitely get floating windows and they live up to the hype. coc.nvim was one of the first adopters I think and it works pretty darn well with things like rls in Rust when you are looking at documentation of methods and such.

👍 8