Fork me on GitHub
Andrea Imparato10:06:54

hello, anybody knows if there's a way in spacemacs to automatically refresh the browser when sending something to the clojure repl?


@andrea.imparato if you are using Ring to drive your server-side web application, then you can use wrap-reload around your application and it will reload the browser when changes are saved. For example


or maybe you want something like figwheel


Yes, figwheel if it's client side ClojureScript that you want to reload


Anyone using clj-kondo in Spacemacs yet for linting their clojure code? I plan to give it a try this week. Would like to see how it compares to joker


@jr0cket I opted to enable both joker and clj-kondo so I first added these to my .spacemacs config like so:

dotspacemacs-additional-packages '(flycheck-clj-kondo flycheck-joker)
And then again in .spacemacs added the following under dotspacemacs/user-config
;; setup clojure linters
  (use-package clojure-mode
    :ensure t
    (require 'flycheck-joker)
    (require 'flycheck-clj-kondo)
    (dolist (checkers '((clj-kondo-clj . clojure-joker)
                        (clj-kondo-cljs . clojurescript-joker)
                        (clj-kondo-cljc . clojure-joker)))
      (flycheck-add-next-checker (car checkers) (cons 'error (cdr checkers)))))

👍 12

That's great, thank you. I will give this a try later tonight. I wonder how easy this would be to add to the Clojure layer as a pull request... Would be great to have them as options you can enable through variables (like is done with clj-refactor)


Would be awesome to have as an option in the clojure layer.

☝️ 4

I've found this: => You might need to modify the snippet a bit


But anyway, thanks for pointing this out. I've just given the clj-kondo a second chance and it looks great!


this may be helpful when contemplating about the joker vs. clj-kondo differences:


@U06BE1L6T thanks for pointing out the git issue. My config is based on clj-kondo docs - seemed to work but have not tested extensively at all.


oh I see... docs are going to be updated so my snippet here will indeed change