cursive

Rachel Westmacott 2025-05-21T10:45:07.274639Z

Sometimes I wish that functions defined in comment blocks were available for auto-completion within the comment block.

markaddleman 2025-05-21T11:08:46.499399Z

The only time I wish for this is always 🙂

👍 1
🤣 1
Rachel Westmacott 2025-05-21T13:31:00.080709Z

If you like horrible hacks, try using this macro instead of comment:

(defmacro don't [& body] ; tell cursive to resolve this as 'clojure.core/do'
  `(comment ~@body))

Rachel Westmacott 2025-05-21T13:34:26.828749Z

I guess in theory you could just tell cursive to resolve comment as do ... 🤔

markaddleman 2025-05-21T13:36:37.862479Z

i like your don’t macro ! a year ago, i tried resolving comment as do but it didn’t achieve the desired result

Rachel Westmacott 2025-05-21T13:37:10.275389Z

I just tried it, and it seems to do what I want now...

Rachel Westmacott 2025-05-21T13:37:24.888439Z

(resolving 'comment' as 'do')

markaddleman 2025-05-21T13:37:32.440019Z

ah, thanks! i’ll add it to my toolbag

msolli 2025-05-21T11:04:46.036929Z

I'm having trouble resolving a custom reader tag. My understanding is that reader tags defined in a data_readers.clj /`data_readers.cljc` file "at the root of the classpath" (as per https://clojure.org/reference/reader#tagged_literals) should be resolvable by Cursive. It doesn't seem to work in my project, though. It is a Polylith project. The root deps.edn has a :local/root dependency on a base where the classpath includes src in the base's directory. The data_readers.cljc file is located there. It is picked up by the Clojure reader when running the app, so I know it works. But Cursive can't seem to figure it out. How can I make it work, or find out what's wrong?

2025-05-21T17:38:21.911579Z

Someone mentioned the same behaviour on here a while back, and I confirmed that it is happening to me as well. Might be a bug in Cursive.

msolli 2025-05-21T19:34:21.655809Z

Thanks, good to know it's not only me! 😅

cfleming 2025-05-21T19:40:37.089759Z

Cursive should pick that up, I'll try to create a repro based on your description.

2025-05-21T19:52:31.469729Z

Colin, I found the other message I was referring to. According to this you did make a fix for the issue. I'm not sure if it made into a 'stable' release, or still in EAP. https://clojurians.slack.com/archives/C0744GXCJ/p1737336351501819?thread_ts=1737336351.501819&cid=C0744GXCJ

cfleming 2025-05-21T21:50:31.559559Z

That fix is definitely in stable builds. I'll try to reproduce based on the description.

tony.kay 2025-05-21T20:39:35.489659Z

I’m still seeing problems in the newer cursive versions with it misbehaving when using ideavim. Basically any time the REPL has output (EVEN if I disable show repl results inline) it throws ideavim into visual mode which makes it very difficult to work on the file if you’re running something i nthe REPL that is logging or otherwise making noise. The last working version was 1.13.5 (pre inline REPL). I’m not sure why, when the option is disabled, the REPL pane should be affecting the editor at all. Are others seeing this problem or am I the only old-school vi user on cursive? 😄

Bob B 2025-05-21T20:48:43.998039Z

I use ideavim and I have inline results disabled, but I'm having trouble re-creating the situation described (as in, I'm using a keybind to send a form to the REPL, but it doesn't change the mode). Do you maybe have a seq of steps I could try? Also, stabbing wildly in the dark, is it possible that there's a keybinding conflict where REPL stuff happens and the mode changes as a result of the same keypress(es)?

tony.kay 2025-05-21T20:52:07.311049Z

Start a loop in the REPL that logs messages every 0.5 seconds. (e.g. like you’re running a web server in the REPL that logs requests or something. Now try to edit. It’s not a problem USING the REPL. It’s a problem that IF the REPL outputs something while you’re just trying to move around in the editor, the editor switches to visual mode as if you pressed v

tony.kay 2025-05-21T20:52:26.770659Z

EVERY time a new line appears in the REPL

2025-05-21T21:02:31.159069Z

dude this used to happen to me

2025-05-21T21:02:34.284999Z

and now it doesnt

2025-05-21T21:02:52.819449Z

and I feel like maybe I did something to fix it(?) but if I did I have no idea what it was

tony.kay 2025-05-21T21:08:02.029009Z

Hm…well, I just realized I’m not on the very latest version, so perhaps it got fixed somewhere along the way

2025-05-21T21:08:11.220999Z

yeah try that

2025-05-21T21:13:26.917099Z

fixed a few months ago tho, so maybe not

Bob B 2025-05-21T21:25:47.697449Z

I'm unable to re-create, so maybe it is a version thing

cfleming 2025-05-21T21:33:59.898679Z

@tony.kay Let me know if the latest version doesn't fix it. Although TBH my ability to fix IdeaVim-related bugs is pretty low...

tony.kay 2025-05-21T21:37:52.026769Z

will do

Joe R. Smith 2025-05-21T20:41:40.783009Z

Are the rendering issues with the REPL and other annoyances when using Jetbrains IntelliJ client/host configurations (e.g., CodeWithMe or Jetbrains Gateway) Jetbrains bugs or Cursive bugs? E.g.,

cfleming 2025-05-21T21:35:27.189229Z

It's very hard to tell, because there's essentially no documentation or guidance from JetBrains on how to handle remote development for plugins, and the fixes I made previously seem to break regularly. I'm planning to have another go-around on that since it affects a lot of people these days.

👍 2