Skip to content

Commit 94a5889

Browse files
committed
start glint from sub folder
1 parent 05f61cb commit 94a5889

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/kotlin/com/emberjs/glint/GlintLspSupportProvider.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
5151
val lspServerManager = LspServerManager.getInstance(project)
5252
var isWsl = false
5353
var wslDistro = ""
54+
var lastDir = project.guessProjectDir()
5455

5556
public val server
5657
get() =
@@ -71,6 +72,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
7172
p.waitFor()
7273
val out = p.inputStream.reader().readText().trim()
7374
if (out == "true") {
75+
lastDir = workingDir
7476
return true
7577
}
7678
}
@@ -79,6 +81,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
7981
return false
8082
}
8183
glintPkg.findFileByRelativePath("bin/glint-language-server.js") ?: return false
84+
lastDir = workingDir
8285
return true
8386
}
8487

@@ -98,7 +101,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
98101
}
99102

100103
override fun createCommandLine(): GeneralCommandLine {
101-
val workingDir = myProject.guessProjectDir()!!
104+
val workingDir = lastDir!!
102105
val workDirectory = VfsUtilCore.virtualToIoFile(workingDir)
103106
var path = workDirectory.path
104107
path = path.replace("\\", "/")

0 commit comments

Comments
 (0)