Fork me on GitHub
#emacs
<
2021-12-08
>
Cora (she/her)18:12:20

for anyone using clojure-mode, here are some useful indents

Cora (she/her)18:12:21

(define-clojure-indent
    (defroutes 'defun)
    (GET 2)
    (POST 2)
    (PUT 2)
    (DELETE 2)
    (HEAD 2)
    (ANY 2)
    (OPTIONS 2)
    (PATCH 2)
    (rfn 2)
    (let-routes 1)
    (context 2)
    (ns '(1 0)))

Cora (she/her)18:12:43

the ns one is to match intellij cursive's indentation of ns

Macroz18:12:18

we have the cursive users match to emacs/cljfmt settings

Cora (she/her)18:12:12

I guess it can go one way or another ¯\(ツ)

Cora (she/her)18:12:23

we have more cursive users than emacs users

👍 1
Cora (she/her)18:12:46

it's funny, cljstyle does it like intellij

Macroz19:12:11

we had originally more Emacs users but it's the LISP standard on some ways too

dpsutton18:12:15

i’d never heard intellij used a different ns indent. interesting

Cora (she/her)18:12:34

I run into it at work all the time

dpsutton18:12:13

i can imagine

Cora (she/her)18:12:35

in an extra bit of fun news: cljstyle indents ns like intellij while cljfmt indents ns like emacs

dpsutton19:12:03

its a good marker to know at a glance who last edited the file 🙂

1
Cora (she/her)19:12:32

@lukaszkorecki I think cljfmt could be made to work like intellij, too?

Cora (she/her)19:12:53

I'm pretty indifferent, but we have more intellij users than emacs users

lukasz19:12:11

I'm not sure, but it's a good question: in my team we have all of the editors (interllij, emacs, doom emacs, vim, vs code) and I'm forcing everyone to use cljstyle + shared config. So having the same tool integrated into all editors would be neat

Cora (she/her)19:12:15

oh, I'm using doom emacs, too, but I don't think they fiddle with clojure indents

Cora (she/her)19:12:10

they add a +clojure-disable-lsp-indentation-h function

Cora (she/her)20:12:42

is anyone using a mode for asciidoc?

Cora (she/her)20:12:46

there are a few out there

lread23:12:48

Funny you should mention adoc @corasaurus-hex, I’m just learning/setting up doom emacs and have just configured adoc-mode. (I don’t know if there are better choices, sorry).

lread23:12:08

I used this package in spacemacs too and found the the default font choices rather odd.

lread23:12:33

But you can override them (https://randomgeekery.org/config/emacs-bmw/#headline-37):

(use-package markup-faces
  :config
  (set-face-attribute 'markup-title-0-face nil :height 1.0)
  (set-face-attribute 'markup-title-1-face nil :height 1.0)
  (set-face-attribute 'markup-title-2-face nil :height 1.0)
  (set-face-attribute 'markup-title-3-face nil :height 1.0)
  (set-face-attribute 'markup-title-4-face nil :height 1.0)
  (set-face-attribute 'markup-title-5-face nil :height 1.0)
  (set-face-attribute 'markup-secondary-text-face nil :height 1.0)
  (set-face-attribute 'markup-meta-face nil
                      :height 1.0
                      :foreground (face-attribute 'font-lock-comment-face :foreground))
  (set-face-attribute 'markup-meta-hide-face nil
                      :height 1.0
                      :foreground (face-attribute 'font-lock-comment-face :foreground))
  (set-face-attribute 'markup-list-face nil
                      :background (face-attribute 'font-lock-builtin-face :background)
                      :foreground (face-attribute 'font-lock-builtin-face :foreground))
  (set-face-attribute 'markup-table-face nil
                      :background (face-attribute 'font-lock-builtin-face :background)
                      :foreground (face-attribute 'font-lock-builtin-face :foreground))
  (set-face-attribute 'markup-verbatim-face nil
                      :background (face-attribute 'font-lock-string-face :background)
                      :foreground (face-attribute 'font-lock-string-face :foreground)))
(`markup-faces` is included with adoc-mode)

lread23:12:16

Honestly, I often switch to Calva when editing markdown because its preview is pretty sweet.

Cora (she/her)23:12:22

and yeah, vs code does a lot of great things

lread23:12:58

Oh yeah, I meant VS Code…. simple_smile

👀 1