Fork me on GitHub
#cursive
<
2022-10-10
>
danm17:10:20

What's the chances of Cursive being made to parse templated strings from clojure.core.strint? We quite often use << from that module, and at the moment Cursive tells us that all our bindings which are only used within the templated string are unused.

cfleming03:10:36

Hmm, I’m not sure about that, it looks like it’s been incubating since 2012. Can you give me a simple example of something that doesn’t work correctly?

danm18:10:04

Fair. I’ve been told by @U09LZR36F that it is very much “here be Dragons” territory that is unlikely to ever move into core proper (as, for example, I discovered that

(let [a “foo”]
  (<< “test ~{a}”))
interpolates properly, but
(let [a “foo”
      tmpl “test ~{a}”]
  (<< tmpl))
totally doesn’t), so it might well not be worth your time. Anyway, if it is, it’s simply a case that Cursive would grey out the a var in the let binding as unused in my first (i.e. working) example above, because it doesn’t recognise the ~{a} within the string arg to << as a use of the var.

danm19:10:09

Semi-related, but non-Cursive: how the hell do you turn off smart quotes on iPhone? ;)

Chris21:10:06

Hey, when doing

(require '[java-time :as jt])
cursive will often complain that jt can’t be resolved and won’t offer completions. Is this happening to anybody else? Do I need to restart something to get it recognized?

cfleming03:10:06

Is java-time added to your project correctly? Can you see it in External Libraries in your project view?

Chris06:10:35

yes, it’s in project.clj and in external libraries as well EDIT: I can also use the functions from java-time in the REPL

Chris06:10:26

I also get this behavior for org.httpkit.client which I’m refering to as http: http/post cannot be resolved

cfleming20:10:06

Can I look at your project, is it public?

Chris08:10:40

I made a minimal project for you here: https://github.com/jakuzure/cursive-intellij-unresolved-minimal after creating the new project I was asked to generate stubs, which I did, after that java-time aka jt was resolved correctly and also fixed in my previous project. I still get the same behavior for httpkit though