cursive

Issues at: https://git.io/cursive-issues
lsenjov 2020-07-31T00:09:43.060500Z

Is there a command to trigger stub generation?

onetom 2020-07-31T04:50:38.060600Z

i missed that the other day too... also, i have a monorepo with 4-5 clojure projects in it now and im being asked 4-5 times whether i want to generate stubs. that would be great if i could just say yes 1 time 🙂

cfleming 2020-07-31T05:26:37.060800Z

There isn’t, but there should be. You can provoke the check by refreshing your lein/deps project from the corresponding toolwindow as a workaround.

👍 2
cfleming 2020-07-31T05:27:11.061Z

@onetom You should only be asked once for that, I think. Do you mean you have multiple deps projects in a single IntelliJ project?

onetom 2020-07-31T05:27:40.061200Z

yes. i have multiple deps modules

onetom 2020-07-31T05:33:50.064300Z

if i understand correctly, we should version control the .idea/clojure-deps.xml files. they contain system aliases though, which might not be present on other systems. those are not transferrable to other machines and iirc they got cleaned up automatically, resulting in an unnecessary churn in changes to this file. what can we do about it? would it make sense to put the system aliases into a different file, which can be gitignored?

onetom 2020-07-31T05:38:24.064400Z

of course turning aliases on and off might also result in changes to the .iml files of other the intellij deps modules, eg:

-    <orderEntry type="library" name="Deps: vlaaad/reveal:d0fe22" level="project" />
+    <orderEntry type="library" name="Deps: Local vlaaad/reveal" level="project" />
i have no idea what to do about that.

onetom 2020-07-31T05:41:12.064600Z

and the alias checkboxes are still buggy. if i click them nothing seems to happen, but if i move up/down in the alias tree, then they update and reflect the new state. initially i thought it should be just my system, but i've seen the same behaviour on 3 other machines too, so i think it's a bug

onetom 2020-07-31T06:00:33.066200Z

hmmm... my run configurations i put in .run/ are not showing up amongst the other ones, which are still under .idea/runConfigurations. how can i make cursive aware of the ones in .run/ ?

onetom 2020-07-31T06:01:58.067300Z

i've also noticed that one of those files have a lot of repetition in them. smells like a bug:

xml
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,kaocha,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
</component>

cfleming 2020-07-31T06:02:12.067400Z

I’m not sure, actually. How are you putting them under .run/?

cfleming 2020-07-31T06:03:25.067600Z

Oh, I see - there’s a “Store configuration file in…” option - I think that’s new, or at least I don’t remember seeing it previously.

onetom 2020-07-31T06:03:52.067800Z

originally they were added under the old location, then the other day i clicked on that cog next to the Store as project file and changed the path to .run

onetom 2020-07-31T06:04:13.068Z

oh, that's not a cursive feature?

cfleming 2020-07-31T06:04:20.068200Z

Could you file an issue for that? I’m not sure what’s going on there. It looks to me like they’re expecting run configs to be in one location, rather than two.

cfleming 2020-07-31T06:04:24.068400Z

No, that’s IntelliJ doing that.

cfleming 2020-07-31T06:04:38.068600Z

But that you can now specify what that location should be.

onetom 2020-07-31T06:05:19.068800Z

aaah... so that's supposed to be a per-project option, not a per run-config! it's not clear from the UI...

onetom 2020-07-31T06:05:57.069Z

beacuse it shows different paths for the different run configs

onetom 2020-07-31T06:18:28.069400Z

so the references to the run configs are stored in workspace.xml, which is not under version control (and correctly so), so im not sure how this new feature is meant to work... 😕 also, i think i've started intellij community editor over this project recently and that might have tangled these settings up, since i had some python run configs too, which are not supported under the CE

onetom 2020-07-31T06:23:26.069600Z

workspace.xml has this kind of magic too, to deal with chaning the run config location:

<component name="ChangeListManager">
    <list default="true" id="73adb5ea-abbc-47f9-83c2-475bd4854522" name="Default Changelist" comment="Reveal integration and documentation">
      <change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Datomic_testbed.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.run/Datomic testbed.run.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Recurrence_REPL.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.run/Recurrence REPL.run.xml" afterDir="false" />
...
    </list>

Empperi 2020-07-31T07:41:01.070700Z

Seems like structural editing choices don't show up anymore in the taskbar. Even though they are selected to be shown. Disabling the selection and re-enabling it won't matter.

Empperi 2020-08-06T05:20:21.101700Z

@cfleming sorry, missed your question but I had answered that just in the next message 🙂 The version was 1.9.3-2020.2

Empperi 2020-08-06T05:21:55.102100Z

Just got an update to 1.9.4-eap1-2020.2 where this issue seems to have gone away 👍

Empperi 2020-07-31T07:41:49.071500Z

Version 1.9.3-2020.2

Trevor 2020-07-31T15:58:44.074500Z

On OSX what's the key binding to send the currently highlighted form (even if it's nested inside another form?) to the REPL? I'm using <CMD>+p and that's great but would be cool to send just a nested bit of the form I'm failing to find it so I figured I'd just ask, thanks!

onetom 2020-08-01T09:17:22.075100Z

I've also assigned Ctrl-Enter (aka Cmd-Shift-P) to Eval top form and Ctrl-Shift-Enter to Eval form before caret, so I can just move to the end of a form and Ctrl-Shift-Enter just that. it's often followed by a Ctrl-Enter to eval the whole, containing form too if I were happy with the evaluation result of the sub-form.

onetom 2020-08-01T09:26:26.075300Z

on that note, i often find myself wanting to evaluate a sub-form, which comes right after my cursor. i was wondering if it would be possible to create a composite action, which does all this at once. if there is an ambiguity, maybe a popup can show the alternatives, just like the variable extraction popup. the rules could be similar to how the Alt-Up Extend Selection decides what to highlight, but favoring sequences as opposed to individual tokens. in other words, when i press ctrl-shift-enter, i would like it to be the combination of a more greedy alt-up + ctrl-enter.

onetom 2020-08-01T09:27:31.075500Z

i could describe such an action as Eval around caret or Eval in caret's vincinity

cfleming 2020-08-02T00:01:01.087100Z

The problem with these sorts of actions is the combinatorial explosion of <form selection>/<how to eval>/<what to do with the results>. Lots of people have asked for an eval which puts the result in a comment in the source file. So I’m planning to extend the REPL commands feature to allow people to build the particular commands they want out of component pieces.

👍 1