Skip to content

Commit c1d17f7

Browse files
authored
fix detect glint (#328)
* fix detect glint * fix glint check
1 parent be9c896 commit c1d17f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
9494
}
9595
val glintPkg = workingDir.findFileByRelativePath("node_modules/@glint/core") ?: return false
9696
glintPkg.findFileByRelativePath("bin/glint-language-server.js") ?: return false
97+
glintCoreDir = glintPkg
9798
return true
9899
}
99100

@@ -106,7 +107,8 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
106107
pkg.readOrDetect()
107108
val path = pkg.`package`.constantPackage?.systemIndependentPath
108109
if (path != null) {
109-
val f = VfsUtil.findFile(Path(path), true)
110+
var f = VfsUtil.findFile(Path(path), true)
111+
f = f?.findFileByRelativePath("bin/glint-language-server.js")
110112

111113
if (f != null) {
112114
return true

0 commit comments

Comments
 (0)