One of the most unexpected things for newcomers to IntelliJ is that you don’t seem to have to save. Indeed, IntelliJ will automatically save either after a certain amount of time (15 sec of inactivity by default) or at certain critical points (when it loses focus, before you run something, etc). This is something that seems very strange to many people at first but most grow to love it. If not, you can disable it in Settings→Appearance & Behaviour→System Settings. If you make a change you’d like to revert, you can always use the Local History function.
As you’re typing, Cursive will suggest autocompletions for the symbol you’re currently typing. It will autocomplete symbols, keywords, namespaces and so forth. You’ll be shown the parameters of functions and the namespaces that the symbols come from in the completion list. Pressing tab will choose the highlighted option (or the top option if none are selected) and replace the current symbol with it. Pressing enter will choose the highlighted option and insert its text directly, without removing the current symbol. Cursive will match the text you’ve typed anywhere in the completion text, it doesn’t have to be at the start.
When you complete the name of a class that isn’t currently imported, Cursive will import it for you. If Cursive sees you’ve typed the name of a class it doesn’t recognise it will prompt you with options to import it.
These will also do what you’d expect in the REPL too.
Coming Soon: We’ll be providing similar auto-require functionality for Clojure symbols.
Cursive also allows you to rename symbols using Shift F6. This will rename the symbol where it’s defined as well as at all usage points.
This works across files too.
When implementing Java interfaces or extending classes with
proxy, Cursive can fill in stubs for the methods you need to create for a particular class. There are two options - Implement Methods and Override Methods. In general, Implement will present a list of all the methods you need to implement for a particular class, generally interface methods and base class abstract methods. Then you can use Override to selectively override base class methods, either from the base class in the case of a proxy, or from Object. This functionality is currently supported for
Coming Soon: Implement functionality for protocols.
Cursive can also create a function implementation stub from an example usage. This will work both within the same file, and in another namespace.