Skip to content

Commit

Permalink
Enable LSP structure view, implement commenter
Browse files Browse the repository at this point in the history
  • Loading branch information
rockofox committed Nov 28, 2024
1 parent ee230da commit f064102
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "boo.fox"
version = "1.3.5"
version = "1.4.0"

repositories {
mavenCentral()
Expand Down
26 changes: 26 additions & 0 deletions src/main/kotlin/boo/fox/haskelllsp/language/HaskellCommenter.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package boo.fox.haskelllsp.language

import com.intellij.lang.Commenter

class HaskellCommenter: Commenter {
override fun getLineCommentPrefix(): String {
return "--"
}

override fun getBlockCommentPrefix(): String {
return "{-"
}

override fun getBlockCommentSuffix(): String {
return "-}"
}

override fun getCommentedBlockCommentPrefix(): String {
return "{-"
}

override fun getCommentedBlockCommentSuffix(): String {
return "-}"
}

}
9 changes: 9 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
</description>

<change-notes><![CDATA[
<h3>1.4.0</h3>
<ul>
<li>Enable LSP structure view</li>
<li>Implement commenter</li>
</ul>
<h3>1.3.5</h3>
<ul>
<li>Update LSP4IJ to 0.8</li>
Expand Down Expand Up @@ -71,6 +76,8 @@
language="Haskell"
extensions="hs">
</fileType>
<lang.commenter language="Haskell"
implementationClass="boo.fox.haskelllsp.language.HaskellCommenter"/>
<internalFileTemplate name="Haskell File"/>
<lang.parserDefinition language="Haskell"
implementationClass="boo.fox.haskelllsp.language.HaskellParserDefinition"/>
Expand All @@ -82,6 +89,8 @@
<codeInsight.parameterInfo
language="Haskell"
implementationClass="com.redhat.devtools.lsp4ij.features.signatureHelp.LSPParameterInfoHandler"/>
<lang.psiStructureViewFactory language="Haskell"
implementationClass="com.redhat.devtools.lsp4ij.features.documentSymbol.LSPDocumentSymbolStructureViewFactory"/>
<notificationGroup id="Haskell LSP"
displayType="BALLOON"/>
</extensions>
Expand Down

0 comments on commit f064102

Please sign in to comment.