From 55bb5d1ad6b2d59970e9d13d9c63db6c32e05fe8 Mon Sep 17 00:00:00 2001 From: rockofox Date: Sun, 7 Apr 2024 18:47:43 +0200 Subject: [PATCH] Add cabal icon --- .../HaskellLspServerSupportProvider.kt | 1 - src/main/kotlin/boo/fox/haskelllsp/Icons.kt | 10 ++ .../CabalRunConfigurationType.kt | 4 +- src/main/resources/icons/cabal.svg | 105 ++++++++++++++++++ 4 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 src/main/kotlin/boo/fox/haskelllsp/Icons.kt create mode 100644 src/main/resources/icons/cabal.svg diff --git a/src/main/kotlin/boo/fox/haskelllsp/HaskellLspServerSupportProvider.kt b/src/main/kotlin/boo/fox/haskelllsp/HaskellLspServerSupportProvider.kt index 76a6ce6..a54973f 100644 --- a/src/main/kotlin/boo/fox/haskelllsp/HaskellLspServerSupportProvider.kt +++ b/src/main/kotlin/boo/fox/haskelllsp/HaskellLspServerSupportProvider.kt @@ -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 } \ No newline at end of file diff --git a/src/main/kotlin/boo/fox/haskelllsp/Icons.kt b/src/main/kotlin/boo/fox/haskelllsp/Icons.kt new file mode 100644 index 0000000..7d753c1 --- /dev/null +++ b/src/main/kotlin/boo/fox/haskelllsp/Icons.kt @@ -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) + } +} \ No newline at end of file diff --git a/src/main/kotlin/boo/fox/haskelllsp/runconfiguration/CabalRunConfigurationType.kt b/src/main/kotlin/boo/fox/haskelllsp/runconfiguration/CabalRunConfigurationType.kt index 4bb24b0..063387c 100644 --- a/src/main/kotlin/boo/fox/haskelllsp/runconfiguration/CabalRunConfigurationType.kt +++ b/src/main/kotlin/boo/fox/haskelllsp/runconfiguration/CabalRunConfigurationType.kt @@ -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)) } diff --git a/src/main/resources/icons/cabal.svg b/src/main/resources/icons/cabal.svg new file mode 100644 index 0000000..b97642b --- /dev/null +++ b/src/main/resources/icons/cabal.svg @@ -0,0 +1,105 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + +