Sometimes I wish that functions defined in comment blocks were available for auto-completion within the comment block.
The only time I wish for this is always 🙂
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))
I guess in theory you could just tell cursive to resolve comment as do ... 🤔
i like your don’t macro ! a year ago, i tried resolving comment as do but it didn’t achieve the desired result
I just tried it, and it seems to do what I want now...
(resolving 'comment' as 'do')
ah, thanks! i’ll add it to my toolbag
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?
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.
Thanks, good to know it's not only me! 😅
Cursive should pick that up, I'll try to create a repro based on your description.
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
That fix is definitely in stable builds. I'll try to reproduce based on the description.
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? 😄
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)?
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
EVERY time a new line appears in the REPL
dude this used to happen to me
and now it doesnt
and I feel like maybe I did something to fix it(?) but if I did I have no idea what it was
Hm…well, I just realized I’m not on the very latest version, so perhaps it got fixed somewhere along the way
yeah try that
related? https://youtrack.jetbrains.com/issue/VIM-3580/New-terminal-switches-editor-to-insert-mode
fixed a few months ago tho, so maybe not
I'm unable to re-create, so maybe it is a version thing
@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...
will do
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.,
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.