Skip to content

Commit

Permalink
Update Sumneko version to 3.7.3 and add execute
Browse files Browse the repository at this point in the history
permission to luaLanguageServer
  • Loading branch information
CppCXY committed Nov 21, 2023
1 parent 55ab728 commit 9f1128c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ val buildDataList = listOf(
)

group = "com.cppcxy"
val sumnekoVersion = "3.7.0"
val sumnekoVersion = "3.7.3"

val sumnekoProjectUrl = "https://github.com/LuaLS/lua-language-server"

Expand Down
7 changes: 5 additions & 2 deletions src/main/kotlin/com/cppcxy/ide/lsp/SumnekoAdaptor.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.cppcxy.ide.lsp

import com.cppcxy.ide.setting.SumnekoSettings
import com.cppcxy.ide.setting.SumnekoSupportLocale
import com.intellij.ide.plugins.PluginManagerCore
import com.intellij.openapi.extensions.PluginId
import com.intellij.openapi.project.Project
Expand Down Expand Up @@ -38,7 +39,7 @@ object SumnekoAdaptor {

val locale: String
get() {
if (SumnekoSettings.getInstance().locale.toString() != "auto") {
if (SumnekoSettings.getInstance().locale != SumnekoSupportLocale.auto) {
return SumnekoSettings.getInstance().locale.toString()
}
val locale = Locale.getDefault()
Expand All @@ -56,7 +57,9 @@ object SumnekoAdaptor {
fun addExecutePermission() {
val file = File(luaLanguageServer)
if (file.exists() && !file.canExecute()) {
file.setExecutable(true)
val runtime = Runtime.getRuntime()
val process = runtime.exec(arrayOf("chmod", "+x", file.absolutePath))
process.waitFor()
}
}
}

0 comments on commit 9f1128c

Please sign in to comment.