File tree 8 files changed +17
-24
lines changed 8 files changed +17
-24
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,8 @@ import System.FilePath
19
19
import Data.Maybe (maybeToList )
20
20
21
21
descriptor :: PluginId -> PluginDescriptor
22
- descriptor plId = defaultPluginDescriptor
23
- { pluginId = plId
24
- , pluginFormattingProvider = Just provider
22
+ descriptor plId = (defaultPluginDescriptor plId)
23
+ { pluginFormattingProvider = Just provider
25
24
}
26
25
27
26
-- | Formatter provider of Brittany.
Original file line number Diff line number Diff line change @@ -41,9 +41,8 @@ import Text.Regex.TDFA.Text()
41
41
-- ---------------------------------------------------------------------
42
42
43
43
descriptor :: PluginId -> PluginDescriptor
44
- descriptor plId = defaultPluginDescriptor
45
- { pluginId = plId
46
- , pluginRules = exampleRules
44
+ descriptor plId = (defaultPluginDescriptor plId)
45
+ { pluginRules = exampleRules
47
46
, pluginCommands = [PluginCommand " codelens.todo" " example adding" addTodoCmd]
48
47
, pluginCodeActionProvider = Just codeAction
49
48
, pluginCodeLensProvider = Just codeLens
Original file line number Diff line number Diff line change @@ -41,9 +41,8 @@ import Text.Regex.TDFA.Text()
41
41
-- ---------------------------------------------------------------------
42
42
43
43
descriptor :: PluginId -> PluginDescriptor
44
- descriptor plId = defaultPluginDescriptor
45
- { pluginId = plId
46
- , pluginRules = exampleRules
44
+ descriptor plId = (defaultPluginDescriptor plId)
45
+ { pluginRules = exampleRules
47
46
, pluginCommands = [PluginCommand " codelens.todo" " example adding" addTodoCmd]
48
47
, pluginCodeActionProvider = Just codeAction
49
48
, pluginCodeLensProvider = Just codeLens
Original file line number Diff line number Diff line change @@ -25,9 +25,8 @@ import Text.Regex.TDFA.Text()
25
25
-- ---------------------------------------------------------------------
26
26
27
27
descriptor :: PluginId -> PluginDescriptor
28
- descriptor plId = defaultPluginDescriptor
29
- { pluginId = plId
30
- , pluginFormattingProvider = Just provider
28
+ descriptor plId = (defaultPluginDescriptor plId)
29
+ { pluginFormattingProvider = Just provider
31
30
}
32
31
33
32
-- ---------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -20,9 +20,8 @@ import Text.Regex.TDFA.Text()
20
20
-- ---------------------------------------------------------------------
21
21
22
22
descriptor :: PluginId -> PluginDescriptor
23
- descriptor plId = defaultPluginDescriptor
24
- { pluginId = plId
25
- , pluginCommands = [PluginCommand (CommandId " typesignature.add" ) " adds a signature" commandAddSignature]
23
+ descriptor plId = (defaultPluginDescriptor plId)
24
+ { pluginCommands = [PluginCommand (CommandId " typesignature.add" ) " adds a signature" commandAddSignature]
26
25
, pluginCodeActionProvider = Just codeAction'
27
26
, pluginCodeLensProvider = Just codeLens'
28
27
, pluginHoverProvider = Just hover'
Original file line number Diff line number Diff line change @@ -29,9 +29,8 @@ import Text.Regex.TDFA.Text()
29
29
-- ---------------------------------------------------------------------
30
30
31
31
descriptor :: PluginId -> PluginDescriptor
32
- descriptor plId = defaultPluginDescriptor
33
- { pluginId = plId
34
- , pluginFormattingProvider = Just provider
32
+ descriptor plId = (defaultPluginDescriptor plId)
33
+ { pluginFormattingProvider = Just provider
35
34
}
36
35
37
36
-- ---------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -24,9 +24,8 @@ import Language.Haskell.LSP.Types
24
24
-- ---------------------------------------------------------------------
25
25
26
26
descriptor :: PluginId -> PluginDescriptor
27
- descriptor plId = defaultPluginDescriptor
28
- { pluginId = plId
29
- , pluginCommands = commands
27
+ descriptor plId = (defaultPluginDescriptor plId)
28
+ { pluginCommands = commands
30
29
, pluginCodeActionProvider = Just codeActionProvider
31
30
}
32
31
Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ data PluginDescriptor =
63
63
, pluginRenameProvider :: ! (Maybe RenameProvider )
64
64
}
65
65
66
- defaultPluginDescriptor :: PluginDescriptor
67
- defaultPluginDescriptor =
66
+ defaultPluginDescriptor :: PluginId -> PluginDescriptor
67
+ defaultPluginDescriptor plId =
68
68
PluginDescriptor
69
- " "
69
+ plId
70
70
mempty
71
71
mempty
72
72
Nothing
You can’t perform that action at this time.
0 commit comments