Java and Kotlin by IntelliJ IDEA settings
Open extension settings
Open the Command Palette (Ctrl+Shift+P) and run Preferences: Open Settings (UI).
In the settings search field, enter
@ext:JetBrains.intellij-server.
Language server settings
- Additional JVM arguments
Setting ID:
intellij.additionalJvmArgsAdditional JVM arguments passed to the language server. For example,
-Xmx4gincreases 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.buildToolThe build tool used for the language server, workspace, and folder. The value
nullallows any build tool. An empty string ("") disables all build tools.- Completion case sensitivity
Setting ID:
intellij.completion.caseSensitivityControls 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.serverPortThe port of a locally running language server. The value
-1uses the bundled language server instead.For configuration instructions, refer to Connect to a local language server.
- Workspace index reuse
Setting ID:
intellij.forkFromWorkspaceThe 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.jdkForSymbolResolutionBy 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.projectsA list of projects to import when automatic detection is not enough.
Each entry declares a project
type(gradle,maven, orbazel) and an absolutefile:///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.serverThe level of tracing between the editor and the language server:
off,messages, orverbose. Theverboselevel logs all protocol messages.For configuration instructions, refer to Configure protocol tracing.
- Workspace reload on save
Setting ID:
intellij.workspace.reloadOnBuildFileSaveControls 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.dataSharingControls 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.regionYour region for JetBrains product terms and data processing.
IDE CLI
- IDE CLI tools for the Cursor agent
Setting ID:
intellij.ideCli.enabledGives the Cursor agent access to the IDE CLI tools of Java and Kotlin by IntelliJ IDEA. The extension publishes the
jetbrains-ide-cliplugin 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.configOne 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, andcoveragefields have no effect. One configuration applies to the whole test run.Each configuration supports the following fields:
name: the configuration name thatjava.test.defaultConfigrefers 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, oneKEY=VALUEpair per line. A relative path starts at the workspace folder. Variables inenvtake 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: thejavaexecutable that runs the tests. If not set, the module JDK runs them.encoding: thefile.encodingvalue of the test JVM. A-Dfile.encodingoption invmArgstakes precedence.classPathsandmodulePaths: 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.defaultConfigor select a configuration when the tests start.- Default test run configuration
Setting ID:
java.test.defaultConfigThe
nameof the configuration fromjava.test.configthat JVM tests use. Thedefaultvalue selects the built-in configuration, which runs tests in the workspace folder.
Bazel
- Intellij › Bazel: Build
Setting ID:
intellij.bazel.buildSelect to build targets when running with the aspect. When disabled, Bazel runs with the
--nobuildflag and performs analysis without building targets.- Intellij › Bazel: Projectview
Setting ID:
intellij.bazel.projectviewSpecify the path to the
.bazelprojectfile, relative to the workspace folder.
Inlay hints
- JetBrains › Java › Hints: Collapse complex types
Setting ID:
jetbrains.java.hints.collapse complex typesCollapse complex types in inlay hints to shorten them.
- JetBrains › Java › Hints › Settings: Method parameter
Setting ID:
jetbrains.java.hints.settings.method parameterShow inlay hints for method parameter names.
- JetBrains › Java › Hints › Types: Call chain
Setting ID:
jetbrains.java.hints.types.call chainShow inlay hints for the types in long call chains.
- JetBrains › Java › Hints › Types: Local variable
Setting ID:
jetbrains.java.hints.types.local variableShow inlay hints for implicit local variable types.
- JetBrains › Java › Settings › Types: Lambda parameter
Setting ID:
jetbrains.java.settings.types.lambda parameterShow inlay hints for lambda parameter types.
- JetBrains › Kotlin › Hints › Call: Chains
Setting ID:
jetbrains.kotlin.hints.call.chainsShow inlay hints for function return types in call chains.
- JetBrains › Kotlin › Hints › Lambda › Receivers: Parameters
Setting ID:
jetbrains.kotlin.hints.lambda.receivers.parametersShow inlay hints for implicit receivers and parameters.
- JetBrains › Kotlin › Hints: Parameters
Setting ID:
jetbrains.kotlin.hints.parametersShow inlay hints for parameter names.
- JetBrains › Kotlin › Hints › Parameters: Compiled
Setting ID:
jetbrains.kotlin.hints.parameters.compiledShow inlay hints for compiled parameter names.
- JetBrains › Kotlin › Hints › Parameters: Excluded
Setting ID:
jetbrains.kotlin.hints.parameters.excludedShow inlay hints for excluded parameter names.
- JetBrains › Kotlin › Hints › Settings › Lambda: Return
Setting ID:
jetbrains.kotlin.hints.settings.lambda.returnShow inlay hints for return expressions.
- JetBrains › Kotlin › Hints › Settings › Types: Property
Setting ID:
jetbrains.kotlin.hints.settings.types.propertyShow inlay hints for property types.
- JetBrains › Kotlin › Hints › Settings › Types: Variable
Setting ID:
jetbrains.kotlin.hints.settings.types.variableShow inlay hints for local variable types.
- JetBrains › Kotlin › Hints › Settings › Value: Ranges
Setting ID:
jetbrains.kotlin.hints.settings.value.rangesShow inlay hints for ranges.
- JetBrains › Kotlin › Hints › Type › Function: Parameter
Setting ID:
jetbrains.kotlin.hints.type.function.parameterShow inlay hints for function parameter types.
- JetBrains › Kotlin › Hints › Type › Function: Return
Setting ID:
jetbrains.kotlin.hints.type.function.returnShow inlay hints for function return types.
- JetBrains › Kotlin › Hints › Value › Kotlin: Time
Setting ID:
jetbrains.kotlin.hints.value.kotlin.timeShow inlay hints for
kotlin.timepackage 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 |
|---|---|
| Name of the package in which the new file is created |
| Current user system login name |
| Current system date |
| Current system time |
| Current year |
| Current month |
| First three letters of the current month name, for example, Jan or Feb |
| Full name of the current month, for example, January or February |
| Current day of the month |
| First three letters of the current day name, for example, Mon or Tue |
| Full name of the current day, for example, Monday or Tuesday |
| Current hour |
| Current minute |
| Name of the current project |
- JetBrains › Templates › Java: Annotation
Setting ID:
jetbrains.templates.java.AnnotationSpecify the template applied to new Java annotations created from the Annotation template.
- JetBrains › Templates › Java: Class
Setting ID:
jetbrains.templates.java.ClassSpecify the template applied to new Java classes created from the Class template.
- JetBrains › Templates › Java: Enum
Setting ID:
jetbrains.templates.java.EnumSpecify the template applied to new Java enums created from the Enum template.
- JetBrains › Templates › Java: Exception
Setting ID:
jetbrains.templates.java.ExceptionSpecify the template applied to new Java exceptions created from the Exception template.
- JetBrains › Templates › Java: Interface
Setting ID:
jetbrains.templates.java.InterfaceSpecify the template applied to new Java interfaces created from the Interface template.
- JetBrains › Templates › Java: Record
Setting ID:
jetbrains.templates.java.RecordSpecify the template applied to new Java records created from the Record template.
- JetBrains › Templates › Kotlin: Annotation
Setting ID:
jetbrains.templates.kotlin.AnnotationSpecify the template applied to new Kotlin annotations created from the Annotation template.
- JetBrains › Templates › Kotlin: Class
Setting ID:
jetbrains.templates.kotlin.ClassSpecify the template applied to new Kotlin classes created from the Class template.
- JetBrains › Templates › Kotlin: Data Class
Setting ID:
jetbrains.templates.kotlin.Data ClassSpecify the template applied to new Kotlin data classes created from the Data Class template.
- JetBrains › Templates › Kotlin: Enum
Setting ID:
jetbrains.templates.kotlin.EnumSpecify the template applied to new Kotlin enums created from the Enum template.
- JetBrains › Templates › Kotlin: File
Setting ID:
jetbrains.templates.kotlin.FileSpecify the template applied to new Kotlin files created from the File template.
- JetBrains › Templates › Kotlin: Interface
Setting ID:
jetbrains.templates.kotlin.InterfaceSpecify the template applied to new Kotlin interfaces created from the Interface template.
- JetBrains › Templates › Kotlin: Object
Setting ID:
jetbrains.templates.kotlin.ObjectSpecify the template applied to new Kotlin objects created from the Object template.