diff --git a/gradle.properties b/gradle.properties index 8fa2c61..f2304ff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,9 +9,8 @@ pluginRepositoryUrl = https://github.com/kizeevov/slint-idea-plugin pluginGroup = dev.slint pluginName = SlintPlugin -pluginVersion = 1.0.2 +pluginVersion = 1.1.0 platformType = IU -#platformVersion = 242-EAP-SNAPSHOT platformVersion = 2024.1 pluginSinceBuild = 241 pluginUntilBuild = diff --git a/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/CommandLineHandler.kt b/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/CommandLineHandler.kt index 73d1931..841c055 100644 --- a/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/CommandLineHandler.kt +++ b/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/CommandLineHandler.kt @@ -4,6 +4,7 @@ import com.intellij.execution.configurations.GeneralCommandLine import com.intellij.ide.plugins.PluginManager import com.intellij.openapi.extensions.PluginId import com.intellij.openapi.util.SystemInfo +import com.intellij.util.system.CpuArch import dev.slint.ideaplugin.ide.settings.SlintBackend import dev.slint.ideaplugin.ide.settings.SlintSettingsState import dev.slint.ideaplugin.ide.settings.SlintStyle @@ -68,19 +69,10 @@ object CommandLineHandler { if (SystemInfo.isMac) { programName = "Slint Live Preview.app/Contents/MacOS/slint-lsp" } else if (SystemInfo.isLinux) { - programName = when (SystemInfo.OS_ARCH) { - "x64" -> { - "slint-lsp-x86_64-unknown-linux-gnu" - } - - "arm" -> { - "slint-lsp-armv7-unknown-linux-gnueabihf" - } - - "arm64" -> { - "slint-lsp-aarch64-unknown-linux-gnu" - } - + programName = when (CpuArch.CURRENT) { + CpuArch.X86_64 -> "slint-lsp-x86_64-unknown-linux-gnu" + CpuArch.ARM32 -> "slint-lsp-armv7-unknown-linux-gnueabihf" + CpuArch.ARM64 -> "slint-lsp-aarch64-unknown-linux-gnu" else -> { return null } diff --git a/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/SlintLspServerDescriptor.kt b/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/SlintLspServerDescriptor.kt index d4780a6..f8a0c51 100644 --- a/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/SlintLspServerDescriptor.kt +++ b/src/main/kotlin/dev/slint/ideaplugin/ide/lsp/SlintLspServerDescriptor.kt @@ -19,7 +19,8 @@ class SlintLspServerDescriptor(project: Project) : ProjectWideLspServerDescripto override fun createInitializationOptions(): Any = SlintSettingsState.getInstance().lspSettings - override fun createLsp4jClient(handler: LspServerNotificationsHandler): Lsp4jClient = SlintLspClient(handler) + // Waiting for fix https://youtrack.jetbrains.com/issue/MP-6574 + // override fun createLsp4jClient(handler: LspServerNotificationsHandler): Lsp4jClient = SlintLspClient(handler) override val lsp4jServerClass: Class = SlintLspServer::class.java override val lspServerListener: LspServerListener = SlintLspServerListener(project)