Fork me on GitHub
#cider
<
2021-02-13
>
ghosttoaster02:02:24

I've bumped it up to 1000 now, but according to my settings is was already set to 100. But I was getting more like 8.

motform09:02:23

How would one go about to use an add-tap to add the cider repl to the tap set? I find this amazingly handy in reveal, but I don't always have it running.

bozhidar12:02:52

@cdimara Just saw your message on discord and responded there. 🙂 Basically that's characters, not lines. For everyone else - https://docs.cider.mx/cider/1.0/repl/configuration.html#auto-trimming-the-repl-buffer

anonimitoraf12:02:55

I have this in my emacs config:

;; Highlight particular macros similar to built-in stuff
;; For example, highlight ghostwheel's `>defn' similar
;; the same way as built-in `defn'
(add-hook 'clojure-mode-hook
          '(lambda ()
             ;; Set some new syntax-highlighting rules.
             (font-lock-add-keywords nil
                                     ;; So many escape codes! But we're really just saying:
                                     ;; Match the '(' character.
                                     ;; Match and group the string '>defn'.
                                     ;; Match some whitespace. \\s-+
                                     ;; Match and group some word characters. \\w+
                                     '(("(\\(>defn\\)\\s-+\\(\\w+\\)"
                                        ;; The first regexp group is a keyword.
                                        (1 font-lock-keyword-face)
                                        ;; The second regexp group is a name.
                                        (2 font-lock-function-name-face))))))

anonimitoraf12:02:32

I can't get the docstring highlight (yet) though

bozhidar12:02:58

The docstring parsing is in clojure-mode's clojure-font-lock-syntactic-face-function.

bozhidar13:02:35

It's not just static rules for font-locking.

anonimitoraf13:02:10

Right, so is there a way to override the rules so >defn is treated the same as defn for example?

bozhidar13:02:49

I guess something like (put '>defn 'clojure-doc-string-elt 2) will do the trick.

anonimitoraf13:02:57

Ah, seems to work. Thanks (indentation is off, but that's a separate issue)

anonimitoraf13:02:39

Is there any way to extend the parser without this hacky method?

bozhidar14:02:42

Not really.

bozhidar14:02:07

It relies on this metadata and somehow you need to supply it to it.

bozhidar14:02:30

clojure-mode simply hardcodes the data for the common macros, that's why people don't notice this.

bozhidar14:02:35

For the indent try something like (put-clojure-indent '>defn :defn)