diff --git a/src/Ide/Plugin/Brittany.hs b/src/Ide/Plugin/Brittany.hs index 831a590f49..9d4fca2368 100644 --- a/src/Ide/Plugin/Brittany.hs +++ b/src/Ide/Plugin/Brittany.hs @@ -19,9 +19,8 @@ import System.FilePath import Data.Maybe (maybeToList) descriptor :: PluginId -> PluginDescriptor -descriptor plId = defaultPluginDescriptor - { pluginId = plId - , pluginFormattingProvider = Just provider +descriptor plId = (defaultPluginDescriptor plId) + { pluginFormattingProvider = Just provider } -- | Formatter provider of Brittany. diff --git a/src/Ide/Plugin/Example.hs b/src/Ide/Plugin/Example.hs index 4ba0d5843c..17ecb08efc 100644 --- a/src/Ide/Plugin/Example.hs +++ b/src/Ide/Plugin/Example.hs @@ -41,9 +41,8 @@ import Text.Regex.TDFA.Text() -- --------------------------------------------------------------------- descriptor :: PluginId -> PluginDescriptor -descriptor plId = defaultPluginDescriptor - { pluginId = plId - , pluginRules = exampleRules +descriptor plId = (defaultPluginDescriptor plId) + { pluginRules = exampleRules , pluginCommands = [PluginCommand "codelens.todo" "example adding" addTodoCmd] , pluginCodeActionProvider = Just codeAction , pluginCodeLensProvider = Just codeLens diff --git a/src/Ide/Plugin/Example2.hs b/src/Ide/Plugin/Example2.hs index 09faab3e99..d91d14e296 100644 --- a/src/Ide/Plugin/Example2.hs +++ b/src/Ide/Plugin/Example2.hs @@ -41,9 +41,8 @@ import Text.Regex.TDFA.Text() -- --------------------------------------------------------------------- descriptor :: PluginId -> PluginDescriptor -descriptor plId = defaultPluginDescriptor - { pluginId = plId - , pluginRules = exampleRules +descriptor plId = (defaultPluginDescriptor plId) + { pluginRules = exampleRules , pluginCommands = [PluginCommand "codelens.todo" "example adding" addTodoCmd] , pluginCodeActionProvider = Just codeAction , pluginCodeLensProvider = Just codeLens diff --git a/src/Ide/Plugin/Floskell.hs b/src/Ide/Plugin/Floskell.hs index ea7488c4cb..b77f974e3e 100644 --- a/src/Ide/Plugin/Floskell.hs +++ b/src/Ide/Plugin/Floskell.hs @@ -25,9 +25,8 @@ import Text.Regex.TDFA.Text() -- --------------------------------------------------------------------- descriptor :: PluginId -> PluginDescriptor -descriptor plId = defaultPluginDescriptor - { pluginId = plId - , pluginFormattingProvider = Just provider +descriptor plId = (defaultPluginDescriptor plId) + { pluginFormattingProvider = Just provider } -- --------------------------------------------------------------------- diff --git a/src/Ide/Plugin/GhcIde.hs b/src/Ide/Plugin/GhcIde.hs index 0aa7c12b77..06ebbd5f75 100644 --- a/src/Ide/Plugin/GhcIde.hs +++ b/src/Ide/Plugin/GhcIde.hs @@ -20,9 +20,8 @@ import Text.Regex.TDFA.Text() -- --------------------------------------------------------------------- descriptor :: PluginId -> PluginDescriptor -descriptor plId = defaultPluginDescriptor - { pluginId = plId - , pluginCommands = [PluginCommand (CommandId "typesignature.add") "adds a signature" commandAddSignature] +descriptor plId = (defaultPluginDescriptor plId) + { pluginCommands = [PluginCommand (CommandId "typesignature.add") "adds a signature" commandAddSignature] , pluginCodeActionProvider = Just codeAction' , pluginCodeLensProvider = Just codeLens' , pluginHoverProvider = Just hover' diff --git a/src/Ide/Plugin/Ormolu.hs b/src/Ide/Plugin/Ormolu.hs index a63f84df56..aa337fbc8e 100644 --- a/src/Ide/Plugin/Ormolu.hs +++ b/src/Ide/Plugin/Ormolu.hs @@ -29,9 +29,8 @@ import Text.Regex.TDFA.Text() -- --------------------------------------------------------------------- descriptor :: PluginId -> PluginDescriptor -descriptor plId = defaultPluginDescriptor - { pluginId = plId - , pluginFormattingProvider = Just provider +descriptor plId = (defaultPluginDescriptor plId) + { pluginFormattingProvider = Just provider } -- --------------------------------------------------------------------- diff --git a/src/Ide/Plugin/Pragmas.hs b/src/Ide/Plugin/Pragmas.hs index 87a40670dd..534610f963 100644 --- a/src/Ide/Plugin/Pragmas.hs +++ b/src/Ide/Plugin/Pragmas.hs @@ -24,9 +24,8 @@ import Language.Haskell.LSP.Types -- --------------------------------------------------------------------- descriptor :: PluginId -> PluginDescriptor -descriptor plId = defaultPluginDescriptor - { pluginId = plId - , pluginCommands = commands +descriptor plId = (defaultPluginDescriptor plId) + { pluginCommands = commands , pluginCodeActionProvider = Just codeActionProvider } diff --git a/src/Ide/Types.hs b/src/Ide/Types.hs index d5f759336a..2d564a4e97 100644 --- a/src/Ide/Types.hs +++ b/src/Ide/Types.hs @@ -63,10 +63,10 @@ data PluginDescriptor = , pluginRenameProvider :: !(Maybe RenameProvider) } -defaultPluginDescriptor :: PluginDescriptor -defaultPluginDescriptor = +defaultPluginDescriptor :: PluginId -> PluginDescriptor +defaultPluginDescriptor plId = PluginDescriptor - "" + plId mempty mempty Nothing