Somewhat related- but what often bothers me from an information design standpoint is how lots of syntax highlighting schemes give the namespace part of the keyword equal or greater visual weight compared to the name portion, even though it's usually the less semantically significant bit of the ident.. I think this contributes somewhat to people's impression of qualified kwds being 'noisy' or verbose? I've made tweaks to my font-lock config to try and reduce this tendency so things look more like :
@qythium It might be different in clojure-ts-mode, but I donβt remember very well. The second half of the summer I spent more time working on the projects, but I really hope to wrap up the support for clojure-ts-mode in CIDER before the end of the year.
And there the font-locking is a lot more configurable (or rather - easier to tweak without hacks), which I guess many people will appreciate.
yeah - in clojure-mode it's hardcoded to font-lock-type-face so I kinda had to monkey patch it with my own font-lock rule:
(,(rx symbol-start
(group-n 1
(repeat 1 2 ":")
(opt (regex clojure--keyword-sym-regexp) "/"))
(group-n 2 (regex clojure--keyword-sym-regexp)))
(1 '+clojure-keyword-prefix-face)
(2 'clojure-keyword-face))
where
(defface +clojure-keyword-prefix-face
'((t
;; :weight light :foreground "grey50"
:weight thin :foreground "grey00"
:inherit clojure-keyword-face))
"Face for the colon and namespace portion of keywords.")
I want to make sure my REPL stays in sync with the source code. Is there a good way to "throw away" vars that no longer have corresponding source code, such as after I rename something?
C-u C-c C-k will "undef" everything in the buffer and then eval everything. I often use it to cleanup the REPL state.
there's cider-undef which I get into the habit of calling before renaming something, or the nuclear undef-all which you can trigger by C-u before cider-load-file
There is also cider-ns-refresh that uses tools.namespace or clj-reload to completely refresh the repl state.
I remove the namespace with
(defun teodorlu-clojure-remove-namespace ()
(interactive)
(cider-interactive-eval "(remove-ns (symbol (str *ns*)))"))
then re-eval the buffer.
Didn't know about cider-undef-all (thanks @qythium!), from the docstring it looks like the same thing.