No, you’ll get it sometimes even if the class is not imported, but Cursive will need to know what the type is. So: (-> (ArrayList.) (.iterator) (.next))
will give you completion on .next
because Cursive knows the type is Iterator
.
That sounds like parinfer - have you disabled that, perhaps?
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.
Thanks for the updates, the voting panel would be super actually
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?
Hmm I wasn't aware of that feature in idea, need to have a look at it
Sounds rather useful
Great tip! I was not aware of this feature on IntelliJ but it works pretty well in my workflow! Thanks, @cfleming
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.
Do you mind to share any other quick list that you have with other Cursive actions? 👀
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.
I see! Thank you for the idea.
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
https://github.com/imrekoszo/dotfiles/tree/master/settings/IdeaIC2020/keymaps
I will try it here. Thanks!
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.
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.
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?
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?
As for your BTW(2), this goes beyond macros 🙂 It’d be amazing for there to be a cross-editor indentation ruleset.
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
Same for programmatic macro descriptions to help static analysis
See https://cursive-ide.com/userguide/formatting.html#code-style-settings
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
Did I miss something in that documentation?
But it uses mnemonics like emacs, right? Is there a simpler solution?
Any other approach are welcome as well. 🙂
not emacs-like mnemonics, just two-stroke chords more like
Intellij is a lot more limited out of the box in that regard than emacs
I found it logical to have commands organised into groups, hence the prefixes. That way I run out of keys a lot slower
Of course you can set up single-stroke keybinds, it's up to you really
Not sure what you mean by simpler solution though
I'm trying to get different approaches to se which one works better for me.
Oh I see. I guess you gotta try a few mappings
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.
Just wanted to say thank you for making "Interrupt current execution" stop REPL printing! That has saved me many REPL restarts today. 😃
@jimka.issy 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.
@reefersleep What does your macro look like?
I use quick lists for testing, Preferences | Appearance & 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.
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.
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.
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.
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.
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.
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.
@jimka.issy 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.