Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
Remove plugin names and descriptions
Browse files Browse the repository at this point in the history
Now redundant as they were just used to return information via the JSON
transport when querying plugins
  • Loading branch information
lukel97 committed Dec 22, 2019
1 parent 1a57c7b commit 44c6fb3
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 29 deletions.
4 changes: 1 addition & 3 deletions hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ type FormattingProvider = T.Text -- ^ Text to format

data PluginDescriptor =
PluginDescriptor { pluginId :: PluginId
, pluginName :: T.Text
, pluginDesc :: T.Text
, pluginCommands :: [PluginCommand]
, pluginCodeActionProvider :: Maybe CodeActionProvider
, pluginDiagnosticProvider :: Maybe DiagnosticProvider
Expand Down Expand Up @@ -596,7 +594,7 @@ instance ExceptionMonad m => ExceptionMonad (ReaderT e m) where
q u (ReaderT b) = ReaderT (u . b)

instance MonadTrans GhcT where
lift m = liftGhcT m
lift = liftGhcT


instance MonadUnliftIO Ghc where
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ type HintTitle = T.Text
applyRefactDescriptor :: PluginId -> PluginDescriptor
applyRefactDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "ApplyRefact"
, pluginDesc = "apply-refact applies refactorings specified by the refact package. It is currently integrated into hlint to enable the automatic application of suggestions."
, pluginCommands =
[ PluginCommand "applyOne" "Apply a single hint" applyOneCmd
, PluginCommand "applyAll" "Apply all hints to the file" applyAllCmd
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Bios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import Haskell.Ide.Engine.Ghc
biosDescriptor :: PluginId -> PluginDescriptor
biosDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "bios"
, pluginDesc = "bios"
, pluginCommands =
[PluginCommand "check" "check a file for GHC warnings and errors" checkCmd]
, pluginCodeActionProvider = Nothing
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Brittany.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import Data.Maybe (maybeToList)
brittanyDescriptor :: PluginId -> PluginDescriptor
brittanyDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "Brittany"
, pluginDesc = "Brittany is a tool to format source code."
, pluginCommands = []
, pluginCodeActionProvider = Nothing
, pluginDiagnosticProvider = Nothing
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Example2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import qualified Language.Haskell.LSP.Types.Lens as J
example2Descriptor :: PluginId -> PluginDescriptor
example2Descriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "Hello World"
, pluginDesc = "An example of writing an HIE plugin"
, pluginCommands =
[ PluginCommand "sayHello" "say hello" sayHelloCmd
, PluginCommand "sayHelloTo ""say hello to the passed in param" sayHelloToCmd
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Floskell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import Haskell.Ide.Engine.PluginUtils
floskellDescriptor :: PluginId -> PluginDescriptor
floskellDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "Floskell"
, pluginDesc = "A flexible Haskell source code pretty printer."
, pluginCommands = []
, pluginCodeActionProvider = Nothing
, pluginDiagnosticProvider = Nothing
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ import PprTyThing
genericDescriptor :: PluginId -> PluginDescriptor
genericDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "generic"
, pluginDesc = "generic actions"
, pluginCommands = [PluginCommand "type" "Get the type of the expression under (LINE,COL)" typeCmd]
, pluginCodeActionProvider = Just codeActionProvider
, pluginDiagnosticProvider = Nothing
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import Documentation.Haddock.Types
haddockDescriptor :: PluginId -> PluginDescriptor
haddockDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "Haddock"
, pluginDesc = "Fishy documentation"
, pluginCommands = []
, pluginCodeActionProvider = Nothing
, pluginDiagnosticProvider = Nothing
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/HfaAlign.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import qualified Safe
hfaAlignDescriptor :: PluginId -> PluginDescriptor
hfaAlignDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "Align Equals"
, pluginDesc = "An example of writing an HIE plugin\nbased on http://www.haskellforall.com/2018/10/detailed-walkthrough-for-beginner.html"
, pluginCommands =
[ PluginCommand "align" "Align = in active range" alignCmd
]
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/HsImport.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import qualified Safe as S
hsimportDescriptor :: PluginId -> PluginDescriptor
hsimportDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "HsImport"
, pluginDesc = "A tool for extending the import list of a Haskell source file."
, pluginCommands = [PluginCommand "import" "Import a module" importModule]
, pluginCodeActionProvider = Just codeActionProvider
, pluginDiagnosticProvider = Nothing
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Liquid.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import Text.Parsec.Text
liquidDescriptor :: PluginId -> PluginDescriptor
liquidDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "Liquid Haskell"
, pluginDesc = "Integration with Liquid Haskell"
, pluginCommands = []
, pluginCodeActionProvider = Nothing
, pluginDiagnosticProvider = Just (DiagnosticProvider
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ import qualified Data.Yaml as Y
packageDescriptor :: T.Text -> PluginDescriptor
packageDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "package"
, pluginDesc = "Tools for editing .cabal and package.yaml files."
, pluginCommands = [PluginCommand "add" "Add a packge" addCmd]
, pluginCodeActionProvider = Just codeActionProvider
, pluginDiagnosticProvider = Nothing
Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Pragmas.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import qualified Language.Haskell.LSP.Types.Lens as J
pragmasDescriptor :: PluginId -> PluginDescriptor
pragmasDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "Add Missing Pragmas"
, pluginDesc = "Provide code actions to add missing pragmas when GHC suggests this"
, pluginCommands =
[ PluginCommand "addPragma" "add the given pragma" addPragmaCmd
]
Expand Down
2 changes: 0 additions & 2 deletions test/unit/ExtensibleStateSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ testPlugins = pluginDescToIdePlugins [testDescriptor "test"]
testDescriptor :: PluginId -> PluginDescriptor
testDescriptor plId = PluginDescriptor
{ pluginId = plId
, pluginName = "testDescriptor"
, pluginDesc = "PluginDescriptor for testing Dispatcher"
, pluginCommands = [
PluginCommand "cmd1" "description" cmd1
, PluginCommand "cmd2" "description" cmd2
Expand Down

0 comments on commit 44c6fb3

Please sign in to comment.