Skip to content

Commit

Permalink
use LSP formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Aug 14, 2024
1 parent 6cff08f commit e9a987a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 380 deletions.
50 changes: 2 additions & 48 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ val buildDataList = listOf(
group = "com.cppcxy"
val emmyluaAnalyzerVersion = "0.6.3"
val emmyDebuggerVersion = "1.8.2"
val emmyluaCodeStyleVersion = "1.5.4"

val emmyluaAnalyzerProjectUrl = "https://github.com/CppCXY/EmmyLuaAnalyzer"
val emmyluaCodeStyleProjectUrl = "https://github.com/CppCXY/EmmyLuaCodeStyle"
Expand Down Expand Up @@ -72,21 +71,8 @@ task("downloadEmmyDebugger", type = Download::class) {
dest("temp/debugger")
}

task("downloadEmmyLuaCodeStyle", type = Download::class) {
src(
arrayOf(
"${emmyluaCodeStyleProjectUrl}/releases/download/${emmyluaCodeStyleVersion}/darwin-arm64.tar.gz",
"${emmyluaCodeStyleProjectUrl}/releases/download/${emmyluaCodeStyleVersion}/darwin-x64.tar.gz",
"${emmyluaCodeStyleProjectUrl}/releases/download/${emmyluaCodeStyleVersion}/linux-x64.tar.gz",
"${emmyluaCodeStyleProjectUrl}/releases/download/${emmyluaCodeStyleVersion}/win32-x64.zip",
)
)

dest("temp/codestyle")
}

task("unzip", type = Copy::class) {
dependsOn("download", "downloadEmmyDebugger", "downloadEmmyLuaCodeStyle")
dependsOn("download", "downloadEmmyDebugger")
// language server
from(zipTree("temp/EmmyLua.LanguageServer-win32-x64.zip")) {
into("server/")
Expand Down Expand Up @@ -116,19 +102,6 @@ task("unzip", type = Copy::class) {
from(zipTree("temp/debugger/linux-x64.zip")) {
into("debugger/linux")
}
// codeStyle
from(zipTree("temp/codestyle/win32-x64.zip")) {
into("CodeFormat")
}
from(tarTree("temp/codestyle/darwin-x64.tar.gz")) {
into("CodeFormat")
}
from(tarTree("temp/codestyle/darwin-arm64.tar.gz")) {
into("CodeFormat")
}
from(tarTree("temp/codestyle/linux-x64.tar.gz")) {
into("CodeFormat")
}

destinationDir = file("temp/unzip")
}
Expand Down Expand Up @@ -160,22 +133,6 @@ task("install", type = Copy::class) {
into("debugger/emmy/mac/arm64")
}

from("temp/unzip/CodeFormat/win32-x64/bin") {
include("CodeFormat.exe")
into("CodeFormat/bin/win32-x64/")
}
from("temp/unzip/CodeFormat/linux-x64/bin") {
include("CodeFormat")
into("CodeFormat/bin/linux-x64/")
}
from("temp/unzip/CodeFormat/darwin-x64/bin") {
include("CodeFormat")
into("CodeFormat/bin/darwin-x64/")
}
from("temp/unzip/CodeFormat/darwin-arm64/bin") {
include("CodeFormat")
into("CodeFormat/bin/darwin-arm64/")
}

destinationDir = file("src/main/resources")
}
Expand All @@ -185,6 +142,7 @@ task("install", type = Copy::class) {
intellij {
pluginName.set("EmmyLua2")
version.set(buildVersionData.ideaSDKVersion)

type.set(buildVersionData.type) // Target IDE Platform
sandboxDir.set("${project.buildDir}/${buildVersionData.ideaSDKShortVersion}/idea-sandbox")
plugins.set(listOf("com.redhat.devtools.lsp4ij:0.3.0"))
Expand Down Expand Up @@ -244,10 +202,6 @@ tasks {
from("${project.projectDir}/src/main/resources/debugger")
into("${destinationDir.path}/${pluginName.get()}/debugger")
}
copy {
from("${project.projectDir}/src/main/resources/CodeFormat")
into("${destinationDir.path}/${pluginName.get()}/CodeFormat")
}
}
}
}
244 changes: 0 additions & 244 deletions src/main/kotlin/com/cppcxy/ide/formatter/CodeFormatAdaptor.kt

This file was deleted.

Loading

0 comments on commit e9a987a

Please sign in to comment.