Setting up Lombok in Intellij

Lombok annotations are a great way to reduce boiler plate code in your project. It helps you to avoid, in spite of shortcuts the IDE offers, the ultimately tedious process of adding code like getters, setters, constructors, builders and more to your classes. Setting up Lombok for an Intellij project involves three steps. 

  1. Enabling annotation processing
  2. Installing the Lombok plugin
  3. Adding the Lombok dependency

First, to make Intellij understand what is going on with the Lombok annotations, enable annotation processing. As of version 2020.1, the checkbox for this setting can be found under Build, Execution, Deployment > Compiler > Annotation Processors.

Second, search for the Intellij Lombok Plugin in your plugin market place and install it.

Thirdly, add the Lombok dependency to your Maven pom file or Gradle build file.

This should be sufficient to include Lombok in your project.