Asciidoctor Editor Config Plugin

build.gradle
plugins {
    id 'org.asciidoctor.editorconfig' version '4.0.2'
}
build.gradle.kts
plugins {
    id("org.asciidoctor.editorconfig") version "4.0.2"
}

Writes an .asciidoctorconfig file so that supporting IDEs can render Asciidoctor-based documentation correctly.

Adding attributes

asciidoctorEditorConfig {
  attributes foo1: 'bar1', foo2: 'bar2' (1)

  additionalAttributes asciidoctorj (2)

  additionalAttributes 'src/docs/asciidoc/attributes.adoc' (3)
}
1 Adds predefined attributes. These attributes are added first to the generated file.
2 Adds all attributes defined on the project extension to the generated file. These attributes are added after the predefined attributes.
3 Appends the context of the specified file to the generated file. Context such as this is added last. This method also allows you to define a number of attributes in your source directory and include them in your main Asciidoc file as well as send them to .asciidoctorconfig.

Changing the output directory

asciidoctorEditorConfig {
  destinationDir = 'docs'
}