This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-30
Channels
- # announcements (3)
- # aws (5)
- # beginners (71)
- # boot (7)
- # calva (74)
- # cider (6)
- # clj-kondo (2)
- # cljs-dev (5)
- # clojars (6)
- # clojure (84)
- # clojure-dev (7)
- # clojure-europe (1)
- # clojure-italy (23)
- # clojure-nl (43)
- # clojure-sanfrancisco (1)
- # clojure-spec (4)
- # clojure-uk (173)
- # clojurebridge (1)
- # clojurescript (14)
- # cursive (44)
- # datomic (9)
- # duct (2)
- # emacs (2)
- # fulcro (4)
- # graalvm (4)
- # graphql (27)
- # hoplon (6)
- # keechma (50)
- # off-topic (3)
- # other-languages (8)
- # pathom (2)
- # pedestal (14)
- # planck (5)
- # re-frame (3)
- # reitit (6)
- # ring (2)
- # robots (2)
- # spacemacs (9)
- # tools-deps (15)
- # vim (44)
@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!
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 conjureOh 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 https://github.com/Olical/conjure/issues/15 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: https://github.com/daveyarwood/dotfiles/commit/74ee8cc6bc5550df871620cf121e6283490c2c08
Oh this is neat, maybe comment it on https://oli.me.uk/2019-03-22-clojure-socket-prepl-cookbook/ ? Could be a useful link from there.
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.
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
['(do)
(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 letI use this to give me a subrepl in a context: https://github.com/gfredericks/debug-repl
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
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.,
https://github.com/ncm2/float-preview.nvim this doesn't seem to have the same problem (linked in deoplete)
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!