This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-03
Channels
- # announcements (1)
- # babashka (31)
- # babashka-sci-dev (53)
- # beginners (33)
- # calva (54)
- # cider (15)
- # clj-kondo (9)
- # clojure (115)
- # clojure-dev (19)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (78)
- # clojurescript (10)
- # clr (9)
- # community-development (9)
- # core-async (24)
- # cursive (18)
- # datomic (59)
- # emacs (43)
- # figwheel-main (2)
- # fulcro (4)
- # graphql (4)
- # malli (7)
- # meander (12)
- # nbb (14)
- # off-topic (22)
- # polylith (9)
- # re-frame (5)
- # reitit (3)
- # releases (1)
- # shadow-cljs (36)
- # sql (1)
- # tools-build (23)
- # xtdb (13)
Given code that has nested p/server
and p/client
calls as below, I'd like to apply a different style to the code (e.g. change background color. So the innermost p/server
code is blue, the p/client
around it, not including the inner p/server
is red, etc. Any guidance what functions to look for?

Way out of my zone of expertise, but maybe fontlock or overlay or treesitter? (Sorry to be so vague, I'm shooting in the dark here).
https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntactic-Font-Lock.html Example from hy-mode: https://github.com/hylang/hy-mode/blob/master/hy-mode.el#L128
font-lock debug tool: https://github.com/Lindydancer/font-lock-studio
maybe helpful: https://www.reddit.com/r/emacs/comments/ywf3na/looking_for_help_with_definederivedmode_i_just/
Tree-sitter customization: https://emacs-tree-sitter.github.io/syntax-highlighting/customization/
Thanks. I found this package, which will serve as a good starting point https://github.com/istib/rainbow-blocks
Not strictly the same thing, but this twitter thread might be some inspo: https://twitter.com/redblobgames/status/1535372843222896642
for the people using consult: I’m having a strange issue with my setup on an m1 mac (i installed emacs using brew install emacs-mac). consult-line and consult-imenu return Invalid function: 1
. has any of you experienced that?
yes, it was sa fresh install today
namely, embark-define-keymap
got deprecated. I'm not sure if you're using Embark, but many people who use Consult do.
another thing is that the convention for consult-preview-key
has changed.
i.e. if you had before -preview-key (kbd "C-SPC")
, you have to do simply: -preview-key "C-SPC"
now
I do use embark. but don’t use preview-key
interestingly helpful command shows consult-line’s doc just fine.
i just looked it up, it’s set to any
the reason I'm telling you to grep for preview key
(and not consult-preview-key
) is because you may have it like this:
(consult-customize
consult-ripgrep consult-git-grep consult-grep ...
:preview-key (kbd "some key"))
This exact thing happened to me.
also, embark-cycle-key
- the same story. I used to have it as embark-cycle-key (kbd "C;")
- now it has to be simplified
hm, don’t have :preview-key set and don’t use embark-define-keymap
i have just bound embark-act
(use-package embark
:bind (("C-S-a" . embark-act)
:map minibuffer-local-map
("C-d" . embark-act))
:config
;; Show Embark actions via which-key
(setq embark-action-indicator
(lambda (map)
(which-key--show-keymap "Embark" map nil nil 'no-paging)
#'which-key--hide-popup-ignore-command)
embark-become-indicator embark-action-indicator))
that’s all
thanks @U0G75ARHC, really strange
all other consult-fns work
consult-line-multi works fine too
let me try updating. Maybe there are some new changes. I am stupid. I don't pin my versions, I just pull the latest vertico/consult/embark from GitHub. Don't be like me. It's a miserable way of computing... lol
haha, I’m the same 🙂
my work machine doesn’t have the issue… it’s just the new one here
maybe I should start doing that…. started using straight to have reproducible builds. then I go about NOT doing straight-freeze-versions
Updated, restarted. Things look good for me. The commit that gave me a headache was this one: https://github.com/minad/consult/commit/9f2ea67ab87f615599a32707c84b4d4287df84d4
But also embark-define-keymap
annoyed me for a bit. This is actually an interesting anecdote.
So they've deprecated that macro. You have to use defvar-keymap
now. And that would be fine. But I'm using Doom. Even though I almost don't use "official" Doom modules, I have "vertico" module enabled. Because it's really good and until now, it served me well. But as I said, I'm stupid. Doom pins the packages in the module. But I deliberately unpined them.
So I thought, "well, I guess maybe it's time to write my own, custom completion module for vertico/consult/embark". Which I have, but it does stuff on top of the Doom's module. And I don't even care specifically about that bit in the module that uses embark-define-keymap
.
So then I scratched my head for a few seconds and just added this at the top of my init:
(defmacro embark-define-keymap (&rest args)
"Temp. fix for:
"
`())
Thx for checking, must be some kind of other issue
Interesting
Hm, that could be a thing