This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-19
Channels
- # 100-days-of-code (5)
- # announcements (1)
- # aws (1)
- # beginners (112)
- # cider (135)
- # cljdoc (6)
- # clojure (111)
- # clojure-dev (8)
- # clojure-italy (3)
- # clojure-nl (5)
- # clojure-sweden (3)
- # clojure-uk (152)
- # clojurescript (101)
- # datascript (14)
- # datomic (61)
- # editors (1)
- # emacs (29)
- # events (7)
- # figwheel (3)
- # figwheel-main (15)
- # fulcro (18)
- # funcool (2)
- # graphql (1)
- # juxt (2)
- # off-topic (51)
- # om (1)
- # overtone (28)
- # perun (2)
- # reagent (1)
- # reitit (6)
- # ring-swagger (5)
- # shadow-cljs (112)
- # spacemacs (49)
- # tools-deps (10)
- # unrepl (11)
- # yada (10)
hey @bozhidar is it the case that clojure-mode
treats any symbol in first place in a list which starts with with-
as if it were a macro with a [x & rest]
signature?
Yeah, I recall we do this. Probably it’s configurable, but I don’t have time to check this now.
I haven't looked, but I've noticed a couple of times functions which start with-
getting indented that way
for example
(tf/with-zone formatter
(if (string? timezone)
(t/time-zone-for-id timezone)
timezone))
How do I fix my JS indentation in spacemacs?
although the alignment of the lines before are so bizarre that who knows what should result
http://cl.ly/1be6d8dd590b/Screen%252520Shot%2525202018-10-19%252520at%25252012.46.39%252520PM.png
Even after changing that part it’s still behaving unexpectedly
Even after getting rid of the map & compose statement it’s still indenting incorrectly
http://cl.ly/21745f4658d2/Screen%252520Recording%2525202018-10-19%252520at%25252001.07%252520PM.gif
Can you try running format the region? I think you're seeing issues where locally they are lined up but globally they are not
http://cl.ly/a18b11b14642/Image%2525202018-10-19%252520at%2525201.11.20%252520PM.png
Appears to want to ignore comments but align to the declaration
I guess it must be
Ok, I’ll just change the .eslintrc and adapt to it but is there any way to get comments to match the indent?
need to find out what mode you are in and ask the package maintainers. reasonably good chance there's a defcustom for it if you want to read the source
js2-mode. Looking through the source now for related settings 🙂
Anybody using lispy? How do I insert an empty vector []
?
so far the best I have found is C-q [ C-q ]
(define-key evil-insert-state-map (kbd "TAB") 'indent-relative)
(define-key evil-insert-state-map (kbd "RET") (lambda () (interactive) (newline) (indent-relative)))
It’s not pretty but I found a way to achieve what I wanted
I found an answer: https://github.com/abo-abo/lispy/issues/64
@jayzawrotny have you configured the indentation settings to use 2 spaces https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/javascript#indentation
Yes. Both settings are set to 2