Fork me on GitHub
#cursive
<
2020-09-24
>
imre09:09:46

Hey @cfleming just out of curiosity, is there a roadmap for Cursive available? I'd love to have a peek at what you think will be coming, whether the focus is on features or fixes etc.

cfleming23:09:36

So I just dragged Cursive kicking and screaming out of the dark ages and got a changelog, so a roadmap would be the next logical step.

cfleming23:09:50

Right now I basically try to fix bugs as they come up, and in the time left over I do new stuff. A fair amount of my new stuff time recently has been spent on licence management, since that was a pain for large customers. But I’m working on actual Cursive new stuff now.

cfleming23:09:59

One thing I’ve planned for a while is to actually have a feedback panel in Cursive, which would allow users to pick 3 bugs and 3 features which are the most important to them, along with a slider saying how important each one is to them. Then I can make those decisions based on what people actually need. Github’s reactions are not really sufficient for voting purposes.

❤️ 6
cfleming23:09:32

In the short term, what I’m working on right now is namespace rewriting, which will allow automatic namespace tidying as well as refactorings such as moving namespaces around, functions between namespaces etc.

❤️ 6
cfleming23:09:08

Then I’m planning to improve Cursive’s CLJS support, since the current JS parser throws exceptions and the current indexing of JS deps in Shadow is pretty bad.

❤️ 6
salam03:09:01

these sound like pretty good milestones that you can quickly put into a simple roadmap.MD and publish somewhere on the Cursive’s GitHub repository or its official website. i’m sure a lot of people (including myself) are interested in this kind of stuff.

imre09:09:00

Thanks for the updates, the voting panel would be super actually

Felipe de Morais12:09:07

Hey folks, what are the Cursive shortcuts that you create to use de REPL commands, run the tests and all of these important actions without conflict with IntelliJ shortcuts?

imre13:09:05

I use a custom, somewhat-mnemonics-based setup. ctrl-r is the repl prefix (`ctrl-r l` to load file, ctrl-r e to send form before caret etc) ctrl-t is the test prefix, followed by t to run current test, shift-t to run all tests in ns, l to run last test

Felipe de Morais13:09:43

I will try it here. Thanks!

Felipe de Morais18:09:40

But it uses mnemonics like emacs, right? Is there a simpler solution?

Felipe de Morais18:09:55

Any other approach are welcome as well. 🙂

imre19:09:23

not emacs-like mnemonics, just two-stroke chords more like

imre19:09:01

Intellij is a lot more limited out of the box in that regard than emacs

imre19:09:53

I found it logical to have commands organised into groups, hence the prefixes. That way I run out of keys a lot slower

imre19:09:38

Of course you can set up single-stroke keybinds, it's up to you really

imre19:09:03

Not sure what you mean by simpler solution though

Felipe de Morais19:09:42

I'm trying to get different approaches to se which one works better for me.

imre19:09:28

Oh I see. I guess you gotta try a few mappings

thumbsup_all 3
🎉 3
cfleming23:09:25

I use quick lists for testing, Preferences | Appearance &amp; Behavior | Quick Lists. For example, I have a list for testing with a single easy key bound to it, and then IntelliJ pops up a menu I can choose an action from.

👀 3
imre09:09:49

Hmm I wasn't aware of that feature in idea, need to have a look at it

imre09:09:00

Sounds rather useful

Felipe de Morais21:09:38

Great tip! I was not aware of this feature on IntelliJ but it works pretty well in my workflow! Thanks, @cfleming

cfleming01:09:15

I like it a lot for groups of related actions that I want to be able to access easily but don’t want individual bindings for.

Felipe de Morais13:09:31

Do you mind to share any other quick list that you have with other Cursive actions? 👀

cfleming21:09:50

I have another one for splitting windows (split vertically/horizontally, unsplit) which I do a lot. But I’m sure I could make a lot more if I sat down and thought about the types of things I typically end up using a menu for.

Felipe de Morais13:09:08

I see! Thank you for the idea.

Jim Newton14:09:03

Similar question already asked in the cider channel. Is there a way for me to tell cursive how to indent a macro call-site? Hopefully I can do so in the macro definition so that any user who uses my macro sees the same indentation, and if a second user edits my file, it won't re-indent differently.

Jim Newton16:09:34

Thanks imre, I saw that already. But I didn't understand the connection to macros I write myself.. I want to tell cursive that my-case should be indented the same as the clojure case

Jim Newton16:09:14

Did I miss something in that documentation?

reefersleep20:09:50

Related; Cursive is marking forms in calls to my threading-like macro as missing parameters. I thought alt+enter and Resolve as… -> would remove these red lines, but they don’t.

cfleming23:09:28

@U010VP3UY9X Cursive doesn’t support Cider’s indent metadata. You can configure it in your project by configuring the indentation to be 1, which is what case uses, and then if you’re sharing your project files in VCS you can have Cursive store that config in the project. Unfortunately that’s the closest thing right now.

cfleming23:09:44

@U0AQ3HP9U What does your macro look like?

cfleming23:09:55

@U010VP3UY9X Reading what you wrote more carefully, in case it wasn’t clear - yes, you can use the customisation described in that doc for your own macros too.

reefersleep06:09:07

@cfleming My macro is like this:

(defmacro ->until [predicate-fn x & forms]
  (let [result (eval x)]
    (if (predicate-fn result)
      result
      (if forms
        (let [form     (first forms)
              threaded (if (seq? form)
                         (list `-> result form)
                         (list form result))]
          `(->until ~predicate-fn ~threaded ~@(next forms)))
        result))))
And can be used like this:
(->until :errors {}
         ((fn [x]
            (prn "hej!")
            (merge x {:dog "fido"})))
         (assoc :errors [])
         (assoc :wow :nej))
"hej!"
=> {:dog "fido", :errors []}

Jim Newton06:09:52

So anyone using my library, but not my project, will get incorrect indentation for the macro calls? Is there a plan/desire to fix this? Or has it been discussed already and rejected.

Jim Newton07:09:45

BTW, extending the syntax to say "Indent A like B" would be really great, and probably easy to implement. That's what I did years ago when I customized slime to another lisp language.

Jim Newton07:09:22

BTW(2) is there some desire to have a mutually understandable indentation specification syntax for clojure which all IDEs could choose to implement? In particular something where the macro designer can annotate on the macro definition, which will be delivered therefore with the macro to whoever uses it?

Jim Newton07:09:50

Clearly the person who delivers a macro in a library would like to make it easy for everyone to use his macro, regardless of the editor his customers choose. right?

reefersleep09:09:16

As for your BTW(2), this goes beyond macros 🙂 It’d be amazing for there to be a cross-editor indentation ruleset.

3
imre09:09:56

Yep that would be most welcome. I don't see any chance of it being clojure-official though, more like an agreement between tool developers

imre09:09:43

Same for programmatic macro descriptions to help static analysis

☝️ 3
kenny23:09:43

Just wanted to say thank you for making "Interrupt current execution" stop REPL printing! That has saved me many REPL restarts today. 😃

👍 9
cfleming23:09:19

One thing I didn’t announce here when it happened, Cursive finally got a changelog! It’s been far too long coming: https://github.com/cursive-ide/cursive/blob/master/CHANGELOG.md. It has details about the last two years’ worth of releases.

❤️ 30
🎉 10
👌 3
salam03:09:01

these sound like pretty good milestones that you can quickly put into a simple roadmap.MD and publish somewhere on the Cursive’s GitHub repository or its official website. i’m sure a lot of people (including myself) are interested in this kind of stuff.