Fork me on GitHub
#emacs
<
2018-10-19
>
j0ni16:10:09

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?

bozhidar07:10:50

Yeah, I recall we do this. Probably it’s configurable, but I don’t have time to check this now.

bozhidar07:10:09

It’s a similar logic to what we have for def*.

j0ni16:10:38

I haven't looked, but I've noticed a couple of times functions which start with- getting indented that way

j0ni16:10:42

for example

(tf/with-zone formatter
  (if (string? timezone)
    (t/time-zone-for-id timezone)
    timezone))

Eccentric J16:10:27

How do I fix my JS indentation in spacemacs?

dpsutton16:10:27

it seems to be aligned with the R.compose

dpsutton16:10:47

although the alignment of the lines before are so bizarre that who knows what should result

dpsutton16:10:00

the ) flush with the gutter is foreign to me

Eccentric J16:10:35

Even after changing that part it’s still behaving unexpectedly

Eccentric J16:10:10

Even after getting rid of the map & compose statement it’s still indenting incorrectly

dpsutton17:10:20

Can you try running format the region? I think you're seeing issues where locally they are lined up but globally they are not

Eccentric J17:10:50

Appears to want to ignore comments but align to the declaration

dpsutton17:10:20

that is the normal style i think?

Eccentric J17:10:34

I guess it must be

Eccentric J17:10:28

Ok, I’ll just change the .eslintrc and adapt to it but is there any way to get comments to match the indent?

dpsutton17:10:49

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

Eccentric J17:10:19

js2-mode. Looking through the source now for related settings 🙂

Lyn Headley18:10:57

Anybody using lispy? How do I insert an empty vector []?

Lyn Headley18:10:54

so far the best I have found is C-q [ C-q ]

Eccentric J18:10:55

(define-key evil-insert-state-map (kbd "TAB") 'indent-relative)
  (define-key evil-insert-state-map (kbd "RET") (lambda () (interactive) (newline) (indent-relative)))

Eccentric J18:10:06

It’s not pretty but I found a way to achieve what I wanted

Eccentric J19:10:08

Yes. Both settings are set to 2