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.
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.
@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
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))))))
I can't get the docstring highlight (yet) though
The docstring parsing is in clojure-mode
's clojure-font-lock-syntactic-face-function
.
It's not just static rules for font-locking.
Right, so is there a way to override the rules so >defn
is treated the same as defn
for example?
I guess something like (put '>defn 'clojure-doc-string-elt 2)
will do the trick.
Ah, seems to work. Thanks (indentation is off, but that's a separate issue)
Is there any way to extend the parser without this hacky method?
Not really.
It relies on this metadata and somehow you need to supply it to it.
clojure-mode
simply hardcodes the data for the common macros, that's why people don't notice this.
For the indent try something like (put-clojure-indent '>defn :defn)