Fork me on GitHub
#cursive
<
2022-01-28
>
cap10morgan21:01:24

When I have cursive format some code, it always moves same-line comments far to the right (e.g. this: foo (:bar baz) ; barring the baz gives you foo becomes this: foo (:bar baz) ; barring the baz gives you foo). is that configurable? I want it to not do that 🙂

cfleming21:01:33

Yep, Preferences | Editor | Code Style | Clojure | General | Comment alignment column. Set it to 0 if you just want them left alone.

🙌 1
dpsutton21:01:02

I think there’s a (lisp) convention that ; aligns to the right and ;; aligns to the left correct?

dpsutton21:01:11

or i suppose ;;; aligns left, ;; aligns at the current indentation level, and ; aligns to the right?

cfleming21:01:14

I’m not sure to be honest.

cfleming21:01:05

I thought ;; was used for kind of like a ‘higher level’ comment about a block of code, which I guess would normally be at the left.

nlessa21:01:24

Hi @cfleming! Using Intellij-2021.3.1 Runtime version: 11.0.13+7-b1751.21 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. and Cursive 1.12.1-2021-3 I am always getting this exception when trying to use the shortcut for REpl-history.

clojure.lang.ArityException: Wrong number of args (2) passed to: cursive.repl.toolwindow/history-move
	at clojure.lang.AFn.throwArity(AFn.java:429)
	at clojure.lang.AFn.invoke(AFn.java:36)
	at cursive.repl.actions$history_next.invokeStatic(actions.clj:542)
	at cursive.repl.actions$history_next.invoke(actions.clj:539)
	at clojure.lang.Var.invoke(Var.java:384)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:31)
	at cursive.actions.ClojureActionBase.actionPerformed(ClojureActionBase.java:38)
	at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:573)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:706)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:265)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:702)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:645)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:584)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:467)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:456)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:224)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:804)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Anyone found this error before?

cfleming22:01:17

Yes, a few people have reported this. I haven’t managed to reproduce it, but there is a fix that I think will work in the next EAP.

💯 2
Drew Verlee22:01:00

does cursive have step debugging features for cljs?

cfleming22:01:49

No, it doesn’t, sadly. It’s something I’d love to add and have spent a decent amount of time investigating, but it’s a lot of work.

❤️ 1
Drew Verlee22:01:26

gotcha, yea. I'm no help there sadly. I'm just collecting information on if anything has support for it. I think the answer is no. I'm curious if somehow all the solutions can share a common set of features though in order get more mind share and hopefully support (financial, etc..).

tony.kay00:02:42

The source maps give you source-level debugging in the js console in Chrome.

tony.kay00:02:49

in the sources tab

tony.kay00:02:12

and exception breakpoints

tony.kay00:02:37

it isn't perfect, but it isn't "nothing"