This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-23
Channels
- # announcements (1)
- # babashka (29)
- # beginners (53)
- # berlin (1)
- # cider (14)
- # clj-kondo (18)
- # cljsrn (16)
- # clojure (141)
- # clojure-france (4)
- # clojure-italy (8)
- # clojure-norway (1)
- # clojure-uk (57)
- # core-async (7)
- # cursive (3)
- # data-science (2)
- # datomic (12)
- # duct (5)
- # fulcro (27)
- # hoplon (37)
- # immutant (1)
- # jobs (2)
- # jobs-discuss (7)
- # kaocha (2)
- # leiningen (3)
- # music (17)
- # nyc (1)
- # off-topic (22)
- # pathom (27)
- # re-frame (33)
- # reitit (23)
- # shadow-cljs (20)
- # tools-deps (15)
- # vim (29)
(use-package cider
:ensure t
:after (clojure-mode)
:init
(setq cider-clojure-cli-global-options "-A:dev")
:config
(setq cider-clojure-cli-global-options "-A:dev")
(setq nrepl-log-messages t)
(add-hook 'cider-mode-hook #'eldoc-mode)
(add-hook 'cider-repl-mode-hook #'eldoc-mode)
(add-hook 'cider-repl-mode-hook #'paredit-mode)
(add-hook 'cider-repl-mode-hook #'rainbow-delimiters-mode))
[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.22.3"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]'
Yes; i use two other packages that depend on cider (`helm-cider` and flycheck-clojure
) - so did a package-del -> eval pinning code -> package-ins -> restart dance before testing anew.
I figured it out, but not sure how to fix (fix running tests in cider I mean). I'm using clojure CLI tools. Tests work with that from the command line however, which made me realise that the only thing I've changed that I think that could cause this within cider is that I moved the inclusion of webasets (resources subfolder) into an alias (to support depstar's way of uberjar-ing)... which probably means that I need to figure out how cider runs tests under clj. I have some code that reads configuration from the resources folder which is causing the NPE.
I guess there's a few options:
1. Put the "resources" folder back into :paths
in deps.edn
, move the webassets elsewhere. Means tests can't hit any code path that hits the static resources route in the webapp tho.
2. Move the reading of configuration into a fn (instead of a module-level def) such that the exception doesn't ocur when attempting to load the namespaces/files.
@U051BLM8F yes I’ve restarted emacs everytime I’m making changes
Can we add something like this to cljr-clean-ns
(defun cljr-ns-align ()
"Align ns requires."
(interactive)
(end-of-buffer)
(when (re-search-backward "^\(ns.*\\(\n.*\\)*\(:require" nil t nil)
(mark-sexp)
(align-regexp (region-beginning)
(region-end)
"\\(\\s-*\\)\\s-:")))
My team recently decided to start aligning requires and I think we like that. It probably should be done maybe via middleware, but I don’t know where the relevant code is.