Fork me on GitHub
#cursive
<
2023-05-12
>
avocade14:05:43

Hey, longtime paid user of Cursive. Something that's been on my wishlist for many years is this: • Is it possible to add a special syntax highlighting to symbols that bind directly to a keyword? So they're not the same color (black) as regular symbols. • It’s currently impossible at a glance to distinguish symbols that bind to actual functions to symbols that bind to keywords, which makes the code unnecessarily harder to read and reason about (for me at least) without jumping to definitions (or using the Mouse shudder to hover on it). ◦ Eg when using a def:ed keyword (which we almost always do as "best practice") in (user-key contextmap) instead of the raw keyword (:something/user contextmap). • It seems like it should be possible for the editor to do this introspection, but maybe I'm wrong.

onetom00:05:04

> using a def:ed keyword (which we almost always do as "best practice") why is it a best practice? i haven't heard about this before. clojure having a namespaced keyword datatype achieves names being 1st class concepts, which can be carried across computational boundaries, like processes and host machines. what would u achieve with 1 more indirection? or more specifically to your example, is the name of your user's key changing during runtime?

avocade15:05:29

No it's not a variable. We like binding it to symbols to avoid typos etc (without having to use specs everywhere to check for conformance which has its own problems). And we've found that the IDE navigation works better for def:ed things in general (strings of course but also kws). And "best practice" written in scare quotes, ie a bit ironic. But we do use it quite a lot.

Jared Langson16:05:15

Does the repl option "copy results to clipboard" work for others? It doesn't work for me.