Skip to content

Commit 6f386b1

Browse files
committed
fix glint message
1 parent f32b934 commit 6f386b1

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Changelog
44
===============================================================================
5+
## 2023.1.15
6+
- fix: support older glint lsp messages
7+
58
## 2023.1.14
69
- fix: improve glint message
710

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins {
1313

1414

1515
group = "com.emberjs"
16-
version = "2023.1.14"
16+
version = "2023.1.15"
1717

1818
// Configure project's dependencies
1919
repositories {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,13 @@ class GlintAnnotationError(val diagnostic: Diagnostic, private val path: String?
273273
override fun getLine() = diagnostic.range.start.line
274274
val endLine = diagnostic.range.end.line
275275
val endColumn = diagnostic.range.end.character
276+
val diagCode = diagnostic.code?.get()
276277
override fun getColumn() = diagnostic.range.start.character
277278
val code by lazy { diagnostic.source?.toString() }
278279

279280
override fun getAbsoluteFilePath(): String? = path
280281

281-
override fun getDescription(): String = diagnostic.message + " (${diagnostic.source}:${diagnostic.code.get()})"
282+
override fun getDescription(): String = diagnostic.message + " (${diagnostic.source}${diagCode?.let { ":${it}" } ?: ""})"
282283

283284
override fun getCategory() = when (diagnostic.severity) {
284285
DiagnosticSeverity.Error -> ERROR_CATEGORY

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
8888
?: throw RuntimeException("glint is not installed")
8989
val file = glintPkg.findFileByRelativePath("bin/glint-language-server.js")
9090
?: throw RuntimeException("glint lsp was not found")
91-
// commandLine.addParameter("--inspect")
91+
// commandLine.addParameter("--inspect-brk")
9292
commandLine.addParameter(file.path)
9393
commandLine.addParameter("--stdio")
9494
commandLine.addParameter("--clientProcessId=" + OSProcessUtil.getCurrentProcessId().toString())

0 commit comments

Comments
 (0)