Skip to content

Commit

Permalink
Add cabal icon
Browse files Browse the repository at this point in the history
  • Loading branch information
rockofox committed Apr 7, 2024
1 parent ee1dbb8 commit 55bb5d1
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ internal class HaskellLspServerSupportProvider : LspServerSupportProvider {
private class HaskellLspServerDescriptor(project: Project) : ProjectWideLspServerDescriptor(project, "Haskell") {
override fun isSupportedFile(file: VirtualFile) = file.extension == "hs"
override fun createCommandLine() = GeneralCommandLine("haskell-language-server-wrapper", "--lsp")
override val lspGoToDefinitionSupport = true
}
10 changes: 10 additions & 0 deletions src/main/kotlin/boo/fox/haskelllsp/Icons.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package boo.fox.haskelllsp

import com.intellij.openapi.util.IconLoader


interface Icons {
companion object {
val Cabal = IconLoader.getIcon("icons/cabal.svg", Icons::class.java)
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package boo.fox.haskelllsp.runconfiguration

import boo.fox.haskelllsp.Icons
import com.intellij.execution.configurations.ConfigurationTypeBase
import com.intellij.icons.AllIcons
import com.intellij.openapi.util.NotNullLazyValue

internal class CabalRunConfigurationType : ConfigurationTypeBase(
ID, "Cabal", "Cabal run configuration type",
NotNullLazyValue.createValue { AllIcons.Nodes.Console }) {
NotNullLazyValue.createValue { Icons.Cabal }) {
init {
addFactory(CabalConfigurationFactory(this))
}
Expand Down
105 changes: 105 additions & 0 deletions src/main/resources/icons/cabal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 55bb5d1

Please sign in to comment.