This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-27
Channels
- # aleph (2)
- # beginners (19)
- # boot (15)
- # cider (1)
- # cljsrn (1)
- # clojure (68)
- # clojure-austin (12)
- # clojure-dev (2)
- # clojure-france (6)
- # clojure-italy (46)
- # clojure-russia (45)
- # clojure-spec (55)
- # clojure-uk (41)
- # clojurescript (117)
- # component (15)
- # cursive (54)
- # datomic (24)
- # events (2)
- # funcool (1)
- # instaparse (4)
- # klipse (30)
- # lein-figwheel (3)
- # leiningen (4)
- # luminus (4)
- # om (10)
- # onyx (13)
- # parinfer (36)
- # proton (1)
- # reagent (1)
- # ring (2)
- # ring-swagger (1)
- # rum (19)
- # test-check (6)
- # testing (9)
- # untangled (1)
Do you have a library that references that somehow? You can see them in File->Project Structure
@cfleming Advanced optimization compiled Javascript code. No clue how this folder ended up being library root. I think we can ignore the issue unless other people see similar things.
Ok, great. Let me know if you can’t figure out how that’s getting marked. I’ve actually never seen that type of directory marking before.
Is it possible to have the output of a repl command inserted (or replace the evaled form) in the edit buffer?
I'm trying to run refactor-nrepl commands that change my current file like:
(with-open [conn (repl/connect :port (Integer/parseInt (slurp ".nrepl-port")))]
(-> (repl/client conn 1000)
(repl/message {:op "clean-ns" :path "src/something/example.clj"})
first
:ns
read-string))
hello!
I have a question
how do I see the result of macroexpansion on my macros?
I'd like to test them
@ericnormand You need to have a REPL running. Then Tools->REPL->View macro expansion
Then you can put the cursor anywhere in the form, and either hit the right arrow icon in the toolbar, or Ctrl/Cmd-Right
That will expand from the root down to the point your cursor is over, so you can selectively expand the parts of the macro you’re interested in.
thanks, mate!
is that documented somewhere?
@snoe Hmm, no - currently the only thing that can be substituted into a REPL command is the selection.
@ericnormand Sadly, no - the doc that exists is at https://cursive-ide.com/userguide/ but it is sadly incomplete.
The x button to "interrupt current execution" doesn't seem to reliably work. Anyone else have this issue? I really don't like having to kill the entire REPL due to one hung evaluation.
@puzzler Unfortunately I don’t think there’s more I can do - I just call the nREPL interrupt operation.
@cfleming how about being able to echo the output of a repl command into a file buffer instead of the repl output?
I wanted to do that for standard REPL execution, but the problem is that I end up with a combinatorial explosion of commands (execute top-level form and print output, execute top-level form and substitute into editor, execute previous form and… etc).
yeah, I'm looking to hoop it up to ideavim, is it possible to expose :action
s for just vim users?
@snoe Is that what you’re after? https://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions
oh I meant for stuff like execute top-level form and substitute into editor
that gives the combinatorial explosion
So… I don’t think so at the moment. How would you want that to work? I’m almost totally Vim-ignorant.
i.e. I think the sort of action you’re talking about is not a standard IntelliJ action.
Right now I have a mapping like noremap cpp :action :cursive.repl.actions/run-last-sexp<CR>
which works great. But, like you said, there aren't as many repl actions in cursive as say cider. I assume that's because you're trying not to overwhelm people. However as a vim user if they existed I could take advantage of them even if they weren't exposed to most users.
So you’d like smaller more composable actions? What sort of actions would be helpful?
so I would like to add noremap c!! :action :cursive.repl.actions/eval-last-sexpr-and-replace<CR>
All actions are by default visible. I guess I could expose them all, perhaps others might like to use those instead of the existing ones.
right if you look at https://github.com/guns/vim-sexp#text-object-selections-visual-operator-pending a motion just defines the bounds to operate on, so I could write a vimscript function that called the cursive action to get the bounds of the curent form, omap af call get_current_form_bounds()
that and it'll be available to delete (`daf`) or select (`vaf`) etc...