|
|
@@ -1213,17 +1213,17 @@ export namespace LSPServer {
|
|
|
id: "kotlin-ls",
|
|
|
extensions: [".kt", ".kts"],
|
|
|
root: async (file) => {
|
|
|
- // 1) Nearest Gradle root (multi-project or included build)
|
|
|
- const settingsRoot = await NearestRoot(["settings.gradle.kts", "settings.gradle"])(file)
|
|
|
- if (settingsRoot) return settingsRoot
|
|
|
- // 2) Gradle wrapper (strong root signal)
|
|
|
- const wrapperRoot = await NearestRoot(["gradlew", "gradlew.bat"])(file)
|
|
|
- if (wrapperRoot) return wrapperRoot
|
|
|
- // 3) Single-project or module-level build
|
|
|
- const buildRoot = await NearestRoot(["build.gradle.kts", "build.gradle"])(file)
|
|
|
- if (buildRoot) return buildRoot
|
|
|
- // 4) Maven fallback
|
|
|
- return NearestRoot(["pom.xml"])(file)
|
|
|
+ // 1) Nearest Gradle root (multi-project or included build)
|
|
|
+ const settingsRoot = await NearestRoot(["settings.gradle.kts", "settings.gradle"])(file)
|
|
|
+ if (settingsRoot) return settingsRoot
|
|
|
+ // 2) Gradle wrapper (strong root signal)
|
|
|
+ const wrapperRoot = await NearestRoot(["gradlew", "gradlew.bat"])(file)
|
|
|
+ if (wrapperRoot) return wrapperRoot
|
|
|
+ // 3) Single-project or module-level build
|
|
|
+ const buildRoot = await NearestRoot(["build.gradle.kts", "build.gradle"])(file)
|
|
|
+ if (buildRoot) return buildRoot
|
|
|
+ // 4) Maven fallback
|
|
|
+ return NearestRoot(["pom.xml"])(file)
|
|
|
},
|
|
|
async spawn(root) {
|
|
|
const distPath = path.join(Global.Path.bin, "kotlin-ls")
|