Lombok Plugin for IntelliJ IDEA
Clone or download
Latest commit 58b04ee Oct 4, 2018
Permalink
Failed to load latest commit information.
.github Issue template (#384) May 5, 2017
gradle/wrapper updated configuration, IDEA 2018.2 and IDEA 2018.3 EAP Sep 30, 2018
lib/mockJDK-1.7 work on Lombok 1.16.8 features #192 Jun 10, 2016
parts used RecursionGuard to prevent recursions during Lombok augment calcu… Oct 5, 2018
patcher disabled/removed patcher module, it is not used at the moment Oct 1, 2018
src used RecursionGuard to prevent recursions during Lombok augment calcu… Oct 5, 2018
test-manual used RecursionGuard to prevent recursions during Lombok augment calcu… Oct 5, 2018
testData removed support for hrisey, because its totally outdated Oct 1, 2018
.editorconfig added travis cache Jul 27, 2016
.gitattributes Create .gitattributes Oct 15, 2013
.gitignore updated .gitignore and batch script Feb 4, 2018
.travis.yml updated configuration, IDEA 2018.2 and IDEA 2018.3 EAP Sep 30, 2018
IntelliJCodeStyle.xml added current codestyle settings Apr 9, 2016
LICENSE updated LICENSE year Apr 9, 2016
README.md updated README Oct 3, 2018
build.gradle removed support for hrisey, because its totally outdated Oct 1, 2018
gradle.properties used RecursionGuard to prevent recursions during Lombok augment calcu… Oct 5, 2018
gradlew updated to grammerkit plugin and Intellij 2017 Aug 20, 2017
gradlew.bat updated to grammerkit plugin and Intellij 2017 Aug 20, 2017
makeRelease.bat bump version Oct 3, 2018
settings.gradle disabled/removed patcher module, it is not used at the moment Oct 1, 2018

README.md

lombok-intellij-plugin Donate

Build Status Code Coverage

JetBrains Plugins Downloads Downloads last month

Gitter Donate

Plugin for IntelliJ IDEA to support Lombok annotations.

Provides support for lombok annotations to write great Java code with IntelliJ IDEA.

Last version (0.21) released on 03.10.2018

Twenty-seventh 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: 2016.2, 2016.3, 2017.X, 2018.X

Last support for IntelliJ 15.0.6 and 2016.1 by plugin version 0.19!

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.

Features / Supports

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.

Installation

Plugin Installation

  • 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.

Required IntelliJ Configuration

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.

Lombok project dependency

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:

Gradle

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.18.2"
Maven

In your pom.xml:

<dependencies>
	<dependency>
		<groupId>org.projectlombok</groupId>
		<artifactId>lombok</artifactId>
		<version>1.18.2</version>
		<scope>provided</scope>
	</dependency>
</dependencies>
Ivy

In your ivy.xml:

<dependency org="org.projectlombok" name="lombok" rev="1.18.2" conf="build" />

IntelliJ and Eclipse compiler

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

Developed By

@mplushnikov Michail Plushnikov

Contributors

Supporters

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.

License

Copyright (c) 2011-2018 Michail Plushnikov. See the LICENSE file for license rights and limitations (BSD).