git clone --recursive https://github.com/intellij-rust/intellij-rust.git
cd intellij-rust
To build the plugin just navigate to the directory you've previously checked it out and type ./gradlew build
. That's it.
To launch the plugin from console just type ./gradlew runIdea
.
For development you could use any editor/IDE of your choice. There is no peculiar dependency on IDEA, though we're particularly stuck to it, therefore providing instructions how to nail it from that side.
If you're using any other particular stack feel free to contribute to that list.
For development you'd need IDEA with Kotlin plugin (which is shipped by default starting from 14.1)
You can get the latest Intellij IDEA Community Edition here. You can also get the version from EAP channel here.
To import the project just: Ctrl + Shift + A
, Import project
or File
, New
, Project from existing sources
, and select build.gradle
from the root directory of the plugin.
To contribute to the code of the project check out the the latest version and follow instructions on how to build & run it.
If you feel yourself new to the field or don't know what you should start coping with check out issue-tracker for the up-for-grab tasks as these may be greatest entry points to the project source code.
If you want to contribute to the project in any of the numerous other ways, first of all consider joining our Gitter therefore being on par with the current development efforts.
NOTA BENE
Please, make sure that all tests pass and Travis reports build as green prior to making a pull request.
Please, consider our code-style prior to submitting the pull request. We love PRs, but much more than just PRs we love PRs that are 'on style'.
For the Java sources we're stuck to the Google's one.
We use Kotlin language for the plugin. If you can program in Java or Rust, you should be able to read/write Kotlin right away. Learn more about Kotlin.
See the IDEA platform documentation. Of a particular interest are the following sections:
It's also very inspirational to browse existing plugins. Check out Erlang and Go plugins.
It is much easier to understand code changes if they are accompanied with
tests. Test classes are placed in the src/test/kotlin
directory, src/test/resources
holds rust files
which are used as fixtures. We also include
CTRS as a submodule and use it to test the
parser.
The test suite can be run by launching:
./gradlew test
To execute tests from within IDE edit default run configuration for JUnit. In the befor launch
section remove
make
and add gradle task assemble testClasses
. Now you can select any test function, class or folder and use
Ctlr + Shift + f10
to launch specific tests.