File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/main/kotlin/com/github/biomejs/intellijbiome/lsp Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,14 @@ import com.intellij.openapi.vfs.VirtualFile
13
13
import com.intellij.platform.lsp.api.LspServer
14
14
import com.intellij.platform.lsp.api.LspServerDescriptor
15
15
import com.intellij.platform.lsp.api.LspServerSupportProvider
16
+ import com.intellij.platform.lsp.api.customization.LspDiagnosticsSupport
16
17
import com.intellij.platform.lsp.api.customization.LspFormattingSupport
17
18
import com.intellij.platform.lsp.api.lsWidget.LspServerWidgetItem
18
19
import kotlin.io.path.Path
19
20
import kotlinx.coroutines.runBlocking
20
21
import org.eclipse.lsp4j.ClientCapabilities
21
22
import org.eclipse.lsp4j.ConfigurationItem
23
+ import org.eclipse.lsp4j.Diagnostic
22
24
23
25
24
26
@Suppress(" UnstableApiUsage" ) class BiomeLspServerSupportProvider : LspServerSupportProvider {
@@ -110,6 +112,14 @@ import org.eclipse.lsp4j.ConfigurationItem
110
112
}
111
113
}
112
114
115
+ override val lspDiagnosticsSupport = object : LspDiagnosticsSupport () {
116
+ override fun getMessage (diagnostic : Diagnostic ) =
117
+ " Biome: ${diagnostic.message} (${diagnostic.code.left} )"
118
+
119
+ override fun getTooltip (diagnostic : Diagnostic ) =
120
+ getMessage(diagnostic)
121
+ }
122
+
113
123
override val clientCapabilities: ClientCapabilities
114
124
get() = super .clientCapabilities.apply {
115
125
workspace.configuration = true
You can’t perform that action at this time.
0 commit comments