You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Syntax highlightning incorrectly recognizes def form #128
Syntax highlightning incorrectly recognizes def form and highlights the first argument of any function which name starts with "def". Notice the highlight of the 'k argument on the screenshot below
Activity
tonsky commentedon Oct 6, 2024
That is unfortunate, but that’s part of design. This way we can support all past and future
def*forms. Any suggestions?KGOH commentedon Oct 7, 2024
maybe make a setting?
like
["*.def.*"]And I'll change it in my config to
["*.defn", "*.def", "*.deftest", "*.defn-"]tonsky commentedon Oct 7, 2024
Can’t, this goes into syntax highlighting, no settings there
KGOH commentedon Oct 7, 2024
let's see
paul allen's cardhow emacs works this around...https://github.com/clojure-emacs/clojure-mode/blob/59888c84b61081e9b0085e388f55132925a66e7a/clojure-mode.el#L898-L927
tonsky commentedon Oct 7, 2024
This wouldn’t work for rum/defc, rum/defcs and humble’s ui/defcomp for example
KGOH commentedon Oct 7, 2024
@tonsky add them too :) this will make a subtle advert for your libs
And then wait for requests to add some other def* forms to your syntax rules. I doubt that this will be a frequent chore