This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-03
Channels
- # aleph (7)
- # announcements (6)
- # babashka (34)
- # beginners (5)
- # calva (1)
- # cider (3)
- # clerk (11)
- # clj-http (1)
- # clj-kondo (35)
- # clojars (6)
- # clojure (114)
- # clojure-australia (1)
- # clojure-brasil (2)
- # clojure-europe (73)
- # clojure-hamburg (3)
- # clojure-nl (1)
- # clojure-norway (27)
- # clojure-uk (4)
- # events (3)
- # graalvm (13)
- # gratitude (4)
- # helix (17)
- # hoplon (1)
- # hyperfiddle (65)
- # instaparse (4)
- # jobs-discuss (6)
- # lsp (2)
- # meander (2)
- # rdf (4)
- # re-frame (51)
- # reitit (28)
- # releases (1)
- # sci (20)
- # shadow-cljs (9)
- # tools-deps (4)
- # xtdb (44)
A question to emacs users. How do you get defnc
to render as a defn
? I made LSP aware of helix adding :lint-as {helix.core/defnc clojure.core/defn}
, but emacs does not render the doc string in the right color.
Yep, both.
Okay, do by chance have your docstrings and strings the same color?
I am using clj-kondo, and have the same :lint-as
declaration you do in .clj-kondo/config.edn
.
Ah, I think LSP uses kondo, too. Thanks for the pointers, hope I can get it working too.
> same color
No, different colors for each. defnc
is jusing font-lock-keyword-face
, and docstrings are using font-lock-string-face
.
Usually clojure-lsp downloads for me automatically some kondo config files for the libs I'm using, this is what it downloads for helix: https://github.com/rafaeldelboni/clojuredocs-helix/blob/main/.clj-kondo/lilactown/helix/clj_kondo/lilactown/helix.clj#L29
> clojure-lsp downloads for me automatically some kondo
Yes, for me too. Didn't notice the new .clj-kondo
directory and I didnt reload the lsp after adding helix. After reloading, linting works without any customization.
But M-x describe-face
still says font-lock-string-face
for me. :melting_face: It should be font-lock-doc-face
.
I've attached a minimal emacs conf that just installs LSP.
emacs -q -l docstring.el
> docstrings are using font-lock-string-face
.
@U050CT4HR I did miss right away that you wrote -string-face
. It's -string-face
for me too, but it should be font-lock-doc-face
. So everything seems consistent.
Haven't had a look into clj-kondo yet, but it looks like passing the bare docstring
in analyze-definition
isn't enough for the full defn
experience.
https://github.com/lilactown/helix/blob/68c7d38113155603f1df47b9e0c22315ff576af4/resources/clj-kondo.exports/lilactown/helix/clj_kondo/lilactown/helix.clj#L47