дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 01:01:17 +02:00
New Java classes got two package and two class declarations: OpenIDEA fills its template after opening the empty file while java-analyzer sent its own skeleton through workspace/applyEdit. java-analyzer's newFileTemplate initialization option is now off, so file creation stays with OpenIDEA's templates. Regression test on the language registry setting.
95 рядки
4.5 KiB
TOML
95 рядки
4.5 KiB
TOML
id = "java"
|
||
name = "Java"
|
||
extensions = ["java"]
|
||
line-comment = "//"
|
||
block-comment = ["/*", "*/"]
|
||
indent = { tab-size = 4, insert-spaces = true }
|
||
ui-mode = "Java"
|
||
tree-sitter = "java"
|
||
scratch-template = '''
|
||
class Scratch {
|
||
public static void main(String[] args) {
|
||
$END$
|
||
}
|
||
}
|
||
'''
|
||
|
||
# Rainbow brackets › angle: editor syntax nodes whose `<` `>` pair up (never comparisons).
|
||
[rainbow-brackets]
|
||
angle = ["TypeArguments", "TypeParameters"]
|
||
|
||
# Microsoft java-debug runs inside jdtls as a bundle (`initializationOptions.bundles`,
|
||
# added when installed); sessions start with `vscode.java.startDebugSession` and the
|
||
# client connects to the returned port (`debugServer`).
|
||
[debugger]
|
||
adapter = "java-debug"
|
||
command = "com.microsoft.java.debug.plugin.jar"
|
||
transport = "tcp"
|
||
install-hint = "Install Microsoft java-debug (Settings › Languages & Frameworks › Language Servers › Java Debugger)"
|
||
# Its lazy values are toString() of objects whose class overrides it.
|
||
resolve-lazy-variables = true
|
||
|
||
[[language-servers]]
|
||
name = "jdtls"
|
||
command = "jdtls"
|
||
root-markers = ["pom.xml", "build.gradle", "build.gradle.kts", "settings.gradle", "settings.gradle.kts", "build.xml", ".project"]
|
||
install-hint = "Install Eclipse JDT Language Server (brew install jdtls, or https://github.com/eclipse-jdtls/eclipse.jdt.ls); runs on a JDK new enough for the installed release, chosen or downloaded automatically"
|
||
|
||
[language-servers.initialization-options]
|
||
bundles = []
|
||
|
||
[language-servers.initialization-options.extendedClientCapabilities]
|
||
# Library classes open as `jdt://` virtual documents (`java/classFileContents`).
|
||
classFileContentsSupport = true
|
||
resolveAdditionalTextEditsSupport = true
|
||
# Move (F6) code actions run the client-side refactoring command; the IDE asks for the
|
||
# destination and requests the edit (`java/getMoveDestinations`, `java/move`).
|
||
moveRefactoringSupport = true
|
||
|
||
[language-servers.initialization-options.settings.java]
|
||
autobuild = { enabled = true }
|
||
contentProvider = { preferred = "fernflowerContentProvider" }
|
||
maven = { downloadSources = false, updateSnapshots = false }
|
||
eclipse = { downloadSources = true }
|
||
references = { includeDecompiledSources = true }
|
||
# The editor's usage lenses count usages; the server's own lenses would search every
|
||
# declaration of the file again, all at once (on by default in JDT LS).
|
||
referencesCodeLens = { enabled = false }
|
||
signatureHelp = { enabled = true }
|
||
symbols = { includeGeneratedCode = true }
|
||
configuration = { updateBuildConfiguration = "automatic" }
|
||
project = { referencedLibraries = ["lib/**/*.jar"] }
|
||
# Generated code (implement methods, getters, toString…) indents like the editor (`indent` above).
|
||
format = { insertSpaces = true, tabSize = 4 }
|
||
# Calls complete as `name()` with the caret inside and parameter info, not guessed arguments;
|
||
# JDK internals (`sun.*`, `com.sun.*`, `jdk.*`) and AWT's `List` stay out of completion and auto-import.
|
||
completion = { guessMethodArguments = "off", filteredTypes = ["java.awt.List", "com.sun.*", "sun.*", "jdk.*", "org.graalvm.*", "io.micrometer.shaded.*"] }
|
||
|
||
[language-servers.initialization-options.settings.java.import]
|
||
# Keep Eclipse metadata (.project, .classpath, .settings) out of the project.
|
||
generatesMetadataFilesAtProjectRoot = false
|
||
exclusions = ["**/node_modules/**", "**/.metadata/**", "**/archetype-resources/**", "**/META-INF/maven/**"]
|
||
maven = { enabled = true }
|
||
gradle = { enabled = true, wrapper = { enabled = true } }
|
||
|
||
# java-analyzer: a native Java server that imports Maven / Gradle builds itself and
|
||
# also serves debugging (`java-analyzer dap`) and the run classpath without jdtls.
|
||
[[language-servers]]
|
||
name = "java-analyzer"
|
||
fallback = true
|
||
command = "java-analyzer"
|
||
root-markers = ["java-analyzer.toml", "pom.xml", "build.gradle", "build.gradle.kts", "settings.gradle", "settings.gradle.kts", "build.xml", ".project"]
|
||
install-hint = "Install java-analyzer in Settings › Languages & Frameworks › Language Servers (https://github.com/l0ng-ai/java-analyzer)"
|
||
|
||
[language-servers.initialization-options]
|
||
# OpenIDEA owns New Java Class templates. Do not race the editor by inserting
|
||
# a second package and class through workspace/applyEdit when it opens an empty file.
|
||
newFileTemplate = false
|
||
|
||
[[language-servers]]
|
||
name = "kmp-lsp"
|
||
fallback = true
|
||
command = "kmp-lsp"
|
||
root-markers = ["pom.xml", "build.gradle", "build.gradle.kts", "settings.gradle", "settings.gradle.kts", "build.xml", ".project"]
|
||
install-hint = "Install kmp-lsp in Settings › Languages & Frameworks › Language Servers (https://github.com/Hessesian/kmp-lsp)"
|