Java and Kotlin by IntelliJ IDEA Help

Java and Kotlin by IntelliJ IDEA settings

Open extension settings

  1. Open the Command Palette (Ctrl+Shift+P) and run Preferences: Open Settings (UI).

  2. In the settings search field, enter @ext:JetBrains.intellij-server.

Language server settings

Additional JVM arguments

Setting ID: intellij.additionalJvmArgs

Additional JVM arguments passed to the language server. For example, -Xmx4g increases the maximum heap size to 4 GB. Changes take effect after a language server restart.

For configuration instructions, refer to Configure JVM memory.

Build tool

Setting ID: intellij.buildTool

The build tool used for the language server, workspace, and folder. The value null allows any build tool. An empty string ("") disables all build tools.

Completion case sensitivity

Setting ID: intellij.completion.caseSensitivity

Controls how code completion matches uppercase and lowercase letters in the text you type:

  • Case-insensitive (none): ignores letter case.

  • First letter only (firstLetter, default): matches the case of the first letter.

  • All letters (all): matches the case of every letter.

Changes take effect after a language server restart.

Language server port

Setting ID: intellij.dev.serverPort

The port of a locally running language server. The value -1 uses the bundled language server instead.

For configuration instructions, refer to Connect to a local language server.

Workspace index reuse

Setting ID: intellij.forkFromWorkspace

The absolute path to a workspace that Java and Kotlin by IntelliJ IDEA has already indexed. The path points to the source checkout, such as the main checkout of a Git worktree, on the machine where the language server runs. Both null (default) and an empty string ("") disable index reuse.

Set this value before opening the new worktree for the first time. When the new workspace has no index, Java and Kotlin by IntelliJ IDEA copies the source index and updates it for the new workspace. Each workspace then keeps its own index. If the source index uses a different format, the language server indexes the new workspace from scratch.

Intellij: JDK For Symbol Resolution

Setting ID: intellij.jdkForSymbolResolution

By default, the language server bundles JetBrains Runtime (JBR) and runs on it. This setting specifies the path to a JDK for symbol resolution (reference navigation and highlighting) when the imported project model does not include a JDK entry.

Projects to import

Setting ID: intellij.projects

A list of projects to import when automatic detection is not enough.

Each entry declares a project type (gradle, maven, or bazel) and an absolute file:/// path to the build file or workspace root. For configuration instructions, refer to Find the project import setting and Configure which projects to import.

Protocol tracing

Setting ID: intellij.trace.server

The level of tracing between the editor and the language server: off, messages, or verbose. The verbose level logs all protocol messages.

For configuration instructions, refer to Configure protocol tracing.

Workspace reload on save

Setting ID: intellij.workspace.reloadOnBuildFileSave

Controls what happens when you save a workspace folder's or subproject's .vscode/settings.json file in the editor.

  • Always (always, default) reloads automatically.

  • Prompt (prompt) asks before reloading.

  • Never (never) skips reloads triggered by these saves.

The following settings control data sharing and your region.

Data sharing

Setting ID: intellij.dataSharing

Controls which diagnostic data the language server shares with JetBrains:

  • Full: sends anonymous usage statistics and full error reports, including exception messages and attachments.

  • Anonymous: sends anonymous usage statistics and anonymized error reports. Exception messages, user data, and attachments are removed.

  • None: does not send usage statistics or error reports.

Region

Setting ID: intellij.region

Your region for JetBrains product terms and data processing.

IDE CLI

IDE CLI tools for the Cursor agent

Setting ID: intellij.ideCli.enabled

Gives the Cursor agent access to the IDE CLI tools of Java and Kotlin by IntelliJ IDEA. The extension publishes the jetbrains-ide-cli plugin to ~/.cursor/plugins/local/ and adds its files to JetBrains/idecli-embedded/. Enabled by default.

When you disable the option, the extension stops publishing the tools and removes the plugin the next time the window starts. The setting applies only to Cursor.

Tests

Test run configurations

Setting ID: java.test.config

One configuration or an array of configurations for running JVM tests. This setting uses the same format as the Test Runner for Java extension, except that the args, when, testKind, sourcePaths, and coverage fields have no effect. One configuration applies to the whole test run.

Each configuration supports the following fields:

  • name: the configuration name that java.test.defaultConfig refers to.

  • vmArgs: VM options and system properties for the test JVM.

  • env: environment variables for the test JVM.

  • envFile: a file with additional environment variables, one KEY=VALUE pair per line. A relative path starts at the workspace folder. Variables in env take precedence.

  • workingDirectory: the working directory of the test JVM. A relative path starts at the workspace folder. If not set, tests run in the directory of their project.

  • javaExec: the java executable that runs the tests. If not set, the module JDK runs them.

  • encoding: the file.encoding value of the test JVM. A -Dfile.encoding option in vmArgs takes precedence.

  • classPaths and modulePaths: entries to add to the class path or module path of the module. Use absolute paths or ${workspaceFolder}. The module runtime is always included, so $Auto, $Runtime, $Test, and entries with the ! prefix have no effect.

  • filters.tags: JUnit tags or tag expressions to run. Tags with the ! prefix are excluded. Only JUnit 5 and 6 support this filter.

  • preLaunchTask: the label of a task from tasks.json that runs before each test JVM starts.

  • postDebugTask: the label of a task from tasks.json that runs after each test JVM stops.

If you define several configurations, set java.test.defaultConfig or select a configuration when the tests start.

Default test run configuration

Setting ID: java.test.defaultConfig

The name of the configuration from java.test.config that JVM tests use. The default value selects the built-in configuration, which runs tests in the workspace folder.

Bazel

Intellij › Bazel: Build

Setting ID: intellij.bazel.build

Select to build targets when running with the aspect. When disabled, Bazel runs with the --nobuild flag and performs analysis without building targets.

Intellij › Bazel: Projectview

Setting ID: intellij.bazel.projectview

Specify the path to the .bazelproject file, relative to the workspace folder.

Inlay hints

JetBrains › Java › Hints: Collapse complex types

Setting ID: jetbrains.java.hints.collapse complex types

Collapse complex types in inlay hints to shorten them.

JetBrains › Java › Hints › Settings: Method parameter

Setting ID: jetbrains.java.hints.settings.method parameter

Show inlay hints for method parameter names.

JetBrains › Java › Hints › Types: Call chain

Setting ID: jetbrains.java.hints.types.call chain

Show inlay hints for the types in long call chains.

JetBrains › Java › Hints › Types: Local variable

Setting ID: jetbrains.java.hints.types.local variable

Show inlay hints for implicit local variable types.

JetBrains › Java › Settings › Types: Lambda parameter

Setting ID: jetbrains.java.settings.types.lambda parameter

Show inlay hints for lambda parameter types.

JetBrains › Kotlin › Hints › Call: Chains

Setting ID: jetbrains.kotlin.hints.call.chains

Show inlay hints for function return types in call chains.

JetBrains › Kotlin › Hints › Lambda › Receivers: Parameters

Setting ID: jetbrains.kotlin.hints.lambda.receivers.parameters

Show inlay hints for implicit receivers and parameters.

JetBrains › Kotlin › Hints: Parameters

Setting ID: jetbrains.kotlin.hints.parameters

Show inlay hints for parameter names.

JetBrains › Kotlin › Hints › Parameters: Compiled

Setting ID: jetbrains.kotlin.hints.parameters.compiled

Show inlay hints for compiled parameter names.

JetBrains › Kotlin › Hints › Parameters: Excluded

Setting ID: jetbrains.kotlin.hints.parameters.excluded

Show inlay hints for excluded parameter names.

JetBrains › Kotlin › Hints › Settings › Lambda: Return

Setting ID: jetbrains.kotlin.hints.settings.lambda.return

Show inlay hints for return expressions.

JetBrains › Kotlin › Hints › Settings › Types: Property

Setting ID: jetbrains.kotlin.hints.settings.types.property

Show inlay hints for property types.

JetBrains › Kotlin › Hints › Settings › Types: Variable

Setting ID: jetbrains.kotlin.hints.settings.types.variable

Show inlay hints for local variable types.

JetBrains › Kotlin › Hints › Settings › Value: Ranges

Setting ID: jetbrains.kotlin.hints.settings.value.ranges

Show inlay hints for ranges.

JetBrains › Kotlin › Hints › Type › Function: Parameter

Setting ID: jetbrains.kotlin.hints.type.function.parameter

Show inlay hints for function parameter types.

JetBrains › Kotlin › Hints › Type › Function: Return

Setting ID: jetbrains.kotlin.hints.type.function.return

Show inlay hints for function return types.

JetBrains › Kotlin › Hints › Value › Kotlin: Time

Setting ID: jetbrains.kotlin.hints.value.kotlin.time

Show inlay hints for kotlin.time package warnings.

File Templates

File templates define the initial contents of newly created source files. Templates use the Apache Velocity template language and support predefined variables, custom variables, conditional expressions, and other Velocity directives. Variables are replaced with their values when a new file is created, allowing you to customize generated files to match your project's coding conventions.

The following predefined variables are available:

Variable

Description

${PACKAGE_NAME}

Name of the package in which the new file is created

${USER}

Current user system login name

${DATE}

Current system date

${TIME}

Current system time

${YEAR}

Current year

${MONTH}

Current month

${MONTH_NAME_SHORT}

First three letters of the current month name, for example, Jan or Feb

${MONTH_NAME_FULL}

Full name of the current month, for example, January or February

${DAY}

Current day of the month

${DAY_NAME_SHORT}

First three letters of the current day name, for example, Mon or Tue

${DAY_NAME_FULL}

Full name of the current day, for example, Monday or Tuesday

${HOUR}

Current hour

${MINUTE}

Current minute

${PROJECT_NAME}

Name of the current project

JetBrains › Templates › Java: Annotation

Setting ID: jetbrains.templates.java.Annotation

Specify the template applied to new Java annotations created from the Annotation template.

JetBrains › Templates › Java: Class

Setting ID: jetbrains.templates.java.Class

Specify the template applied to new Java classes created from the Class template.

JetBrains › Templates › Java: Enum

Setting ID: jetbrains.templates.java.Enum

Specify the template applied to new Java enums created from the Enum template.

JetBrains › Templates › Java: Exception

Setting ID: jetbrains.templates.java.Exception

Specify the template applied to new Java exceptions created from the Exception template.

JetBrains › Templates › Java: Interface

Setting ID: jetbrains.templates.java.Interface

Specify the template applied to new Java interfaces created from the Interface template.

JetBrains › Templates › Java: Record

Setting ID: jetbrains.templates.java.Record

Specify the template applied to new Java records created from the Record template.

JetBrains › Templates › Kotlin: Annotation

Setting ID: jetbrains.templates.kotlin.Annotation

Specify the template applied to new Kotlin annotations created from the Annotation template.

JetBrains › Templates › Kotlin: Class

Setting ID: jetbrains.templates.kotlin.Class

Specify the template applied to new Kotlin classes created from the Class template.

JetBrains › Templates › Kotlin: Data Class

Setting ID: jetbrains.templates.kotlin.Data Class

Specify the template applied to new Kotlin data classes created from the Data Class template.

JetBrains › Templates › Kotlin: Enum

Setting ID: jetbrains.templates.kotlin.Enum

Specify the template applied to new Kotlin enums created from the Enum template.

JetBrains › Templates › Kotlin: File

Setting ID: jetbrains.templates.kotlin.File

Specify the template applied to new Kotlin files created from the File template.

JetBrains › Templates › Kotlin: Interface

Setting ID: jetbrains.templates.kotlin.Interface

Specify the template applied to new Kotlin interfaces created from the Interface template.

JetBrains › Templates › Kotlin: Object

Setting ID: jetbrains.templates.kotlin.Object

Specify the template applied to new Kotlin objects created from the Object template.

25 November 2026