Skip to content

Commit 35ee2cd

Browse files
committed
build: Fix deprecated API usage
Updates to new LSP classes. Requires at least IntelliJ 2025.2.3
1 parent 2afdc7e commit 35ee2cd

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ pluginRepositoryUrl = https://github.com/oxc-project/oxc-intellij-plugin
77
pluginVersion = 0.0.17
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
10-
pluginSinceBuild = 251
10+
pluginSinceBuild = 252
1111
# This is unset so that we don't have to publish a new plugin version for every major.minor version of IntelliJ IDE.
1212
# https://github.com/oxc-project/oxc-intellij-plugin/issues/231
1313
# pluginUntilBuild =
1414

1515
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
16+
# Use IU as the platformType to download docs/sources for IntelliJ classes in the IDE.
1617
platformType = WS
17-
platformVersion = 2025.1.3
18+
platformVersion = 2025.2.3
1819

1920
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
2021
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22

src/main/kotlin/com/github/oxc/project/oxcintellijplugin/lsp/OxcLspServerDescriptor.kt

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import com.intellij.openapi.diagnostic.thisLogger
1010
import com.intellij.openapi.project.Project
1111
import com.intellij.openapi.vfs.VirtualFile
1212
import com.intellij.platform.lsp.api.LspServerDescriptor
13-
import com.intellij.platform.lsp.api.customization.LspDiagnosticsSupport
13+
import com.intellij.platform.lsp.api.customization.LspCompletionDisabled
14+
import com.intellij.platform.lsp.api.customization.LspCustomization
15+
import com.intellij.platform.lsp.api.customization.LspFormattingDisabled
16+
import com.intellij.platform.lsp.api.customization.LspGoToDefinitionDisabled
17+
import com.intellij.platform.lsp.api.customization.LspHoverDisabled
1418
import org.eclipse.lsp4j.ClientCapabilities
1519
import org.eclipse.lsp4j.ConfigurationItem
1620
import org.eclipse.lsp4j.InitializeParams
@@ -80,15 +84,20 @@ class OxcLspServerDescriptor(
8084
}
8185
}
8286

83-
override val lspGoToDefinitionSupport = false
87+
override val lspCustomization: LspCustomization
88+
get() {
89+
return object : LspCustomization() {
90+
override val goToDefinitionCustomizer = LspGoToDefinitionDisabled
8491

85-
override val lspCompletionSupport = null
92+
override val completionCustomizer = LspCompletionDisabled
8693

87-
override val lspFormattingSupport = null
94+
override val formattingCustomizer = LspFormattingDisabled
8895

89-
override val lspHoverSupport = false
96+
override val hoverCustomizer = LspHoverDisabled
9097

91-
override val lspDiagnosticsSupport: LspDiagnosticsSupport = OxcLspDiagnosticsSupport()
98+
override val diagnosticsCustomizer = OxcLspDiagnosticsSupport()
99+
}
100+
}
92101

93102
private fun createWorkspaceConfig(workspace: VirtualFile): Map<String, Any?> {
94103
val oxcPackage = OxcPackage(project)

0 commit comments

Comments
 (0)