Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 29 18:19
    bbatsov commented #2823
  • Mar 29 18:18
    bbatsov labeled #2823
  • Mar 29 18:18
    bbatsov labeled #2824
  • Mar 29 18:17
    bbatsov labeled #2825
  • Mar 29 18:16
    bbatsov labeled #2825
  • Mar 29 18:16
    bbatsov commented #2825
  • Mar 29 15:50
    dgr commented #2825
  • Mar 29 15:48
    dgr commented #2825
  • Mar 29 14:43
    dpsutton commented #2825
  • Mar 28 21:07
    stale[bot] closed #2760
  • Mar 28 21:07
    stale[bot] commented #2760
  • Mar 28 15:56
    bbatsov commented #2826
  • Mar 28 15:55

    bbatsov on master

    Trim ' prefixes from cider-symb… Resolve ns-aliased keywords in … Add tests for cider-symbol-at-p… and 1 more (compare)

  • Mar 28 15:55
    bbatsov closed #2826
  • Mar 28 15:52

    bbatsov on master

    Use nREPL 0.7.0 (compare)

  • Mar 27 14:03
    jr0cket commented #2751
  • Mar 27 11:02
    yuhan0 synchronize #2826
  • Mar 27 09:48
    bbatsov commented #2826
  • Mar 27 09:17
    yuhan0 synchronize #2826
  • Mar 27 09:12
    yuhan0 edited #2826
Nicolas Almy
@almynic
this is my init.el https://pastebin.com/gqvwAmhB
i added ac-cider but somehow I doesn't work when i'm editing clojure files
Bost
@Bost
Hi I've got a problem with cider--format-reindent: Wrong type argument: arrayp, nil. Does anyone experienced it before?
Bost
@Bost
@jr0cket I improved the comment function(s):
(defun clojure-toggle-reader-comment-fst-sexp-on-line ()
  (interactive)
  (let* ((point-pos1 (point)))
    (evil-insert-line 0)
    (let* ((point-pos2 (point))
           (cmtstr "#_")
           (cmtstr-len (length cmtstr))
           (line-start (buffer-substring-no-properties
                        point-pos2 (+ point-pos2 cmtstr-len))))
      (if (string= cmtstr line-start)
          (progn
            (delete-char cmtstr-len)
            (goto-char point-pos1)
            (left-char cmtstr-len))
        (progn
          (insert cmtstr)
          (goto-char point-pos1)
          (right-char cmtstr-len))))))
;; Bound to "s-\" (s is the windows super-key)

(defun clojure-toggle-reader-comment-current-sexp ()
  (interactive)
  (newline-and-indent)
  (clojure-toggle-reader-comment-fst-sexp-on-line))
;; Bound to "C-s-\" (s is the windows super-key)
@jr0cket ... improved and renamed.
@jr0cket Oh yea. Giving good names is hard.
John Stevenson
@jr0cket
Thanknyou @Bost your code is much appreciated
Bost
@Bost
Regarding cask task of clojure-mode. Does anyone know what this means / how to fix it?
$ make test
make: *** No rule to make target '/home/bost/dev/clojure-mode/.cask/25.3/elpa', needed by 'test'.  Stop.
Sean Allred
@vermiculus
Might cask/cask#399 be related?
Bost
@Bost
Hard to tell. I just installed cask. I have to have a look. Thanx for the hint anyway. I realized my $PATH needs some cleanup.
Bost
@Bost
@vermiculus no I think the cask/cask#399 is unrelated to my problem.
Tim
@timofeytt
Hi everyone. I have a clj web project (chestnut app) that I'd like to work on. When I evaluate application.clj there is a main method that starts a web server. However, once I execute the whole buffer in CIDER, there is no local server started.
(defn -main [& _]
  (let [config (config)]
    (-> config
        app-system
        component/start)
    (println "Started chestnut-tutorial on" (str "http://localhost:" (:http-port config)))))
How is CIDER supposed to work with web servers?
To me this appears to be an important use-case that needs documentation.
Tim
@timofeytt
My main question is why is main method not evaluated? Now, I see that the standard procedure is to call (run) from cider-repl.
Neil Okamoto
@gonewest818
With C-c C-k that (defn -main ...) is evaluated but that’s not the same as evaluating -(main). Type (-main) at the repl and the webserver should start, is that right?
If you’re using component, however, you might want to look at this workflow instead. https://github.com/stuartsierra/component/blob/master/README.md#entry-points-for-development
Artur Malabarba
@Malabarba
@timofeytt You can run the main function with M-x cider-run, but that's not how you usually start servers with cider.
Well, actually, it's fine if your function is asyncronous
But if your function is synchronous I think it'll lock up the repl for you
A different way to do it (which I'm pretty sure is documented) is to add cider-nrepl to your project.clj. Then you can start your server normally and connect with M-x cider-connect
The command is pretty smart and should offer tab-completion for your server
Artur Malabarba
@Malabarba
As for your last question. Indeed, Cider doesn't take the liberty of calling functions for you after connecting. That's why there's a command for calling -main
Neil Okamoto
@gonewest818
a few messages ago I think @Malabarba meant to say "...addtools.nrepl to your project.clj"
Artur Malabarba
@Malabarba
Probably :-)
And I probably shouldn't give instructions off the top of my head about stuff I last worked on over a year ago 🙄
Tim
@timofeytt
@Malabarba Yes, it makes sense that it shouldn't automatically evaluate function definitions. You have basically described: 1) start a server and inject your REPL inside it. I see that the current chestnut project supports 2) starting REPL with project context and executing (run) or (go) to launch server. How do these things automagically work? Is it documented somewhere?
Tim
@timofeytt
I mean the function definition is evaluated, but not called as expected.
Lars Andersen
@expez
@timofeytt run and go is typically functions that are part of the 'reloaded workflow'
It goes with https://github.com/stuartsierra/component to manage starting and stopping the system/components
Anyway, you might have better luck in the #clojure channel on freenode or on slackchat, as this doesn't really have anything to do with emacs/cider
Artur Malabarba
@Malabarba
@timofeytt I've included links to the manual in my answer to your SO question
But I think I don't understand what you're asking now.
Tim
@timofeytt
@Malabarba I was wondering where (run) and (cljs-repl) are defined, but now that I've found it inside generated code of the project. It's simpler that I thought. Thank you.
P.S.: It's not my SO question.
Alexander Yakushev
@alexander-yakushev
Hey folks. CIDER used to render asynchronous errors from core.async in the nrepl-server buffer, now it doesn't. Am I missing something?
Alexander Yakushev
@alexander-yakushev
Sorry, my bad.
Adam Faraj
@adamfaraj
Anyone here?
feng lee
@87260280
@ShionAt 👍!
Lispre
@Lispre
happy new year, everyone
Dimitri Fedorov
@ai212983
i'm not sure if you're aware of this, but current build is broken. my spacemacs fails to download latest release from melpa
Shion
@ShionAt
Please allow me to show ShionKeys again
Alex Stokes
@ralexstokes
is there any way to have the buffer-overlay pretty-print?
Neil Okamoto
@gonewest818
No. You pretty-print to a popup, or insert a pretty-printed comment into the current buffer.
Alex Stokes
@ralexstokes
how would i do the latter?
Neil Okamoto
@gonewest818
cider-pprint-eval-last-sexp (C-c C-p) : Evaluate the form preceding point and pretty-print the result in a popup buffer. If invoked with a prefix argument, insert the result into the current buffer as a comment.
Alex Stokes
@ralexstokes
thanks!
Neil Okamoto
@gonewest818
In other words, with the prefix argument would be C-u C-c C-p