diff --git a/src/main/kotlin/com/emberjs/glint/GlintLspSupportProvider.kt b/src/main/kotlin/com/emberjs/glint/GlintLspSupportProvider.kt index 5ebd5f70..da1656a6 100644 --- a/src/main/kotlin/com/emberjs/glint/GlintLspSupportProvider.kt +++ b/src/main/kotlin/com/emberjs/glint/GlintLspSupportProvider.kt @@ -139,7 +139,6 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri fun getGlintVersion(): String? { val workingDir = lastDir!! - val workDirectory = VfsUtilCore.virtualToIoFile(workingDir) var path = workingDir.findFileByRelativePath("node_modules/@glint/core/package.json") ?: return null return PackageJsonData.getOrCreate(path).version?.rawVersion } @@ -152,7 +151,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri val pkg = config.getPackage() val pkgPath = pkg.`package`.constantPackage?.systemIndependentPath if (pkgPath != null && File(pkgPath).exists()) { - path = File(pkgPath).parentFile.parentFile.path + path = File(pkgPath).parentFile.parentFile.parentFile.path } path = path.replace("\\", "/") this.isWsl = false diff --git a/src/main/kotlin/com/emberjs/hbs/TagReferencesProvider.kt b/src/main/kotlin/com/emberjs/hbs/TagReferencesProvider.kt index abf5c1bf..8723e29e 100644 --- a/src/main/kotlin/com/emberjs/hbs/TagReferencesProvider.kt +++ b/src/main/kotlin/com/emberjs/hbs/TagReferencesProvider.kt @@ -199,6 +199,9 @@ fun toAttributeReference(target: XmlAttribute): PsiReference? { if (name.length == 1) { return null } + if (!name.contains("|")) { + return null + } var range = TextRange(0, name.length) if (name.startsWith("|")) { range = TextRange(1, range.endOffset)