This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-10
Channels
- # announcements (4)
- # beginners (116)
- # boot (4)
- # calva (63)
- # cider (8)
- # clara (20)
- # cljdoc (10)
- # cljsrn (69)
- # clojure (115)
- # clojure-austin (1)
- # clojure-dev (4)
- # clojure-finland (1)
- # clojure-italy (3)
- # clojure-nl (6)
- # clojure-russia (10)
- # clojure-uk (84)
- # clojurescript (28)
- # cursive (14)
- # data-science (1)
- # datascript (1)
- # datomic (11)
- # duct (3)
- # emacs (13)
- # figwheel-main (11)
- # fulcro (4)
- # graphql (6)
- # jackdaw (2)
- # jobs (23)
- # jobs-rus (1)
- # kaocha (11)
- # lein-figwheel (13)
- # leiningen (55)
- # luminus (14)
- # lumo (22)
- # off-topic (121)
- # pathom (19)
- # re-frame (6)
- # reagent (3)
- # reitit (22)
- # remote-jobs (10)
- # ring-swagger (1)
- # shadow-cljs (67)
- # slack-help (5)
- # spacemacs (1)
- # sql (18)
- # vim (28)
- # yada (2)
Does anybody here use Emacs? I’d like to use clojure-mode
, paredit-mode
, show-paren-mode
and rainbow-delimiters-mode
for editing Clojure files but I can’t figure out how to enable these automatically. I’ve been enabling them manually.
This is one reason I use the Spacemacs configuration for Emacs. I just open a Clojure file or add the word clojure
to the Spacemacs layer config and Get coding http://spacemacs.org/
If you want craft your own Emacs config, then take a look at http://www.cider.mx/en/latest/additional_packages/ for some ideas.
If you need more ideas on configuring all these packages, take a look at https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure
Or just join the #cider channel on this Slack community for help (or #spacemacs channel if you choose that approach)
(use-package clojure-mode
;;:pin melpa-stable
:ensure t
:config
(setq clojure-toplevel-inside-comment-form t)
(add-hook 'clojure-mode-hook #'paredit-mode)
(add-hook 'clojure-mode-hook #'subword-mode)
(add-hook 'clojure-mode-hook #'rainbow-delimiters-mode))
@aryyya.xyz This is an example from my init.el
use-package has a :hook
option which can make those last three
:hook (paredit-mode subword-mode rainbow-delimiters-mode)
How to do nested for with cl-loop? i.e. something like this:
(cl-loop
for i from 0 to 3
for j from 0 to 1
collect (list i j))
# Wanted result, not what actually happens:
=> ((0 0) (0 1) (1 0) (1 1) (2 0) (2 1) (3 0) (3 1))