Fork me on GitHub
#cursive
<
2023-05-19
>
onetom02:05:36

Can I disable namespace aliased keyword suggestions in Cursive's auto-completion feature? I have Datomic attributes, like :gini.user/persona and I have (:require [gini.user :as gini-user]), which contains logic related to our users. This results in auto-completion only offering the ::gini-user/persona as a candidate, which makes my datalog queries and pull expressions non-portable to other NSes, which doesn't define this NS alias. In other words, I only use this alias for referencing functions, like gini-user/create. This helps Cursive to automatically require the namespace in the NS form, which wouldn't happen, if I just use gini.user/create.

cfleming02:05:41

So, I don’t think so at the moment, no, but it’s a good idea. There’s also another fix I’ve got some work on waiting in a branch, which is to fully qualify elements when copying and then shortening them again when pasting. I assume it’s cutting and pasting between namespaces that is problematic for these keywords?

onetom03:05:21

Correct and thx for the quick response!

cfleming03:05:00

Ok, I’ll try to finish up the pasting issue first, since I think that’s the better solution. When that’s done, if it’s still annoying I’ll think about config for this.

👌 2
onetom03:05:06

We do copy-paste to Slack sometimes too, which then get pasted into my colleagues own REPL namespaces. It sounds like your proposed solution would handle this case well too! I would still like the non-aliased version being offered 1st, then the aliased, so the code does not have to change during copy-pasting.

cfleming03:05:40

Ok, I’ll think about that too.

caleb.macdonaldblack03:05:52

This has bothered me for some time too. Would love to see it implemented

seancorfield03:05:55

Can someone help this person with Cursive and REPLs, probably on Windows from the look of it, with Leiningen: https://www.reddit.com/r/Clojure/comments/13lceyo/im_having_the_same_problem_as_some_guy_had_like_3/

seancorfield04:05:16

Saw your responses on Reddit -- thanks, @U0567Q30W!

cfleming04:05:26

No worries, I don’t like to RTFM but sometimes it’s just the best thing to do. I think they’ve just messed up the project setup somehow.

seancorfield04:05:29

Yeah, that looked a bit suss to me (and I'm not familiar with IntelliJ)...

cfleming04:05:43

Definitely suss…