Plugin for IntelliJ IDEA to support Lombok annotations.
Provides support for lombok annotations to write great Java code with IntelliJ IDEA.
Last version (0.16) released on 04.02.2018
Twenty-third version of plugin released. Contains a lot of bugfixes and some new features!
Install it automatically from IntelliJ Idea plugin repository.
Tested and supports IntelliJ versions: 15.0.6, 2016.3.7, 2017.3.4
Last support for IntelliJ 14.1.7 by plugin version 0.14!
Last support for IntelliJ 11.1.5, 12.1.7, 13.1.6 by plugin version 0.11
Last support for IntelliJ 10.5.4 by plugin version 0.8.7
With this plugin your IntelliJ can recognize all of generated getters, setters and some other things from lombok project, so that you get code completion and are able to work without errors stating the methods don't exists.
- @Getter and @Setter
- @ToString
- @EqualsAndHashCode
- @AllArgsConstructor, @RequiredArgsConstructor and @NoArgsConstructor
- @Log, @Log4j, @Log4j2, @Slf4j, @XSlf4j, @CommonsLog, @JBossLog
- @Data
- @Builder
- @Singular
- @Delegate
- @Value
- @Accessors
- @Wither
- @SneakyThrows
- @val available from IntelliJ 14.1 (improved in 2016.2)
- @UtilityClass available from IntelliJ 2016.2
- lombok config files syntax highlighting
- code inspections
- refactoring actions (lombok and delombok)
- project configuration inspection (missing/out-of-date Lombok dependency, annotation processing disabled)
Many features of the plugin (including warnings) could be disabled through per-project settings.
Note: To make use of plugin features like @UtilityClass
and for better val
and Value
support while using IntelliJ 14.1 - 2016.1, you need to enable "Runtime patching" in Plugin settings. This is not needed with 2016.2 and higher.
- Using IDE built-in plugin system on Windows:
- File > Settings > Plugins > Browse repositories... > Search for "lombok" > Install Plugin
- Using IDE built-in plugin system on MacOs:
- Preferences > Settings > Plugins > Browse repositories... > Search for "lombok" > Install Plugin
- Manually:
- Download the latest release and install it manually using Preferences > Plugins > Install plugin from disk...
Restart IDE.
In your project: Click Preferences -> Build, Execution, Deployment -> Compiler, Annotation Processors. Click Enable Annotation Processing
Afterwards you might need to do a complete rebuild of your project via Build -> Rebuild Project.
Make sure you have Lombok dependency added to your project. This plugin does not automatically add it for you.
Please Note: Using newest version of the Lombok dependency is recommended, but does not guarantee that all the features introduced will be available. See Lombok changelog for more details.
If you are using Gradle/Maven/Ivy, see example below:
In your build.gradle
:
// 'compile' can be changed to 'compileOnly' for Gradle 2.12+
// or 'provided' if using 'propdeps' plugin from SpringSource
compile "org.projectlombok:lombok:1.16.20"
In your pom.xml
:
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.20</version>
<scope>provided</scope>
</dependency>
</dependencies>
In your ivy.xml
:
<dependency org="org.projectlombok" name="lombok" rev="1.16.20" conf="build" />
If you're using Eclipse compiler with lombok, try this setup:
- install plugin
- make sure Lombok dependency is added to the project
- change compiler setting:
- ... > Compiler > Java Compiler > Use Compiler: Eclipse
- ... > Compiler > Annotation Processors > Enable annotation processing: checked (default configuration)
- ... > Compiler > Additional build process VM options: -javaagent:lombok.jar
@mplushnikov Michail Plushnikov
Contributors
- @akozlova Anna Kozlova
- @adamarmistead adamarmistead
- @AlexejK Alexej Kubarev
- @bulgakovalexander Alexander Bulgakov
- @krzyk Krzysztof Krasoń
- @mg6maciej Maciej Górski
- @mlueders Mike Lueders
- @ruurd Ruurd Pels
- @Sheigutn Florian Böhm
- @siosio siosio
- @Siriah Iris Hupkens
- @tlinkowski Tomasz Linkowski
- @toadzky David Harris
- @twillouer William Delanoue
- @uvpoblotzki Ulrich von Poblotzki
YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.
Copyright (c) 2011-2018 Michail Plushnikov. See the LICENSE file for license rights and limitations (BSD).