|
1 | 1 | -- Copyright (c) 2019 The DAML Authors. All rights reserved. |
2 | 2 | -- SPDX-License-Identifier: Apache-2.0 |
3 | | -{-# LANGUAGE CPP #-} |
4 | 3 | {-# LANGUAGE OverloadedStrings #-} |
5 | 4 | {-# LANGUAGE RecordWildCards #-} |
6 | 5 | module Main(main) where |
7 | 6 |
|
8 | 7 | import Ide.Arguments (Arguments (..), LspArguments (..), |
9 | 8 | getArguments) |
10 | 9 | import Ide.Main (defaultMain) |
11 | | -import Ide.Types (IdePlugins) |
| 10 | +import Plugins |
12 | 11 |
|
13 | | - -- haskell-language-server plugins |
14 | | - |
15 | | -import Ide.Plugin.Eval as Eval |
16 | | -import Ide.Plugin.Example as Example |
17 | | -import Ide.Plugin.Example2 as Example2 |
18 | | -import Ide.Plugin.Floskell as Floskell |
19 | | -import Ide.Plugin.Fourmolu as Fourmolu |
20 | | -import Ide.Plugin.GhcIde as GhcIde |
21 | | -import Ide.Plugin.ExplicitImports as ExplicitImports |
22 | | -import Ide.Plugin.Ormolu as Ormolu |
23 | | -import Ide.Plugin.Retrie as Retrie |
24 | | -import Ide.Plugin.StylishHaskell as StylishHaskell |
25 | | -import Ide.Plugin.Tactic as Tactic |
26 | | -import Ide.Plugin.Hlint as Hlint |
27 | | -#if AGPL |
28 | | -import Ide.Plugin.Brittany as Brittany |
29 | | -#endif |
30 | | -import Ide.Plugin (pluginDescToIdePlugins) |
31 | | -import Ide.Plugin.ModuleName as ModuleName |
32 | | -import Ide.Plugin.Pragmas as Pragmas |
33 | | - |
34 | | - |
35 | | --- --------------------------------------------------------------------- |
36 | | - |
37 | | --- | The plugins configured for use in this instance of the language |
38 | | --- server. |
39 | | --- These can be freely added or removed to tailor the available |
40 | | --- features of the server. |
41 | | - |
42 | | -idePlugins :: Bool -> IdePlugins |
43 | | -idePlugins includeExamples = pluginDescToIdePlugins allPlugins |
44 | | - where |
45 | | - allPlugins = if includeExamples |
46 | | - then basePlugins ++ examplePlugins |
47 | | - else basePlugins |
48 | | - basePlugins = |
49 | | - [ GhcIde.descriptor "ghcide" |
50 | | - , Pragmas.descriptor "pragmas" |
51 | | - , Floskell.descriptor "floskell" |
52 | | - , Fourmolu.descriptor "fourmolu" |
53 | | - , Tactic.descriptor "tactic" |
54 | | - -- , genericDescriptor "generic" |
55 | | - -- , ghcmodDescriptor "ghcmod" |
56 | | - , Ormolu.descriptor "ormolu" |
57 | | - , StylishHaskell.descriptor "stylish-haskell" |
58 | | - , Retrie.descriptor "retrie" |
59 | | -#if AGPL |
60 | | - , Brittany.descriptor "brittany" |
61 | | -#endif |
62 | | - , Eval.descriptor "eval" |
63 | | - , ExplicitImports.descriptor "importLens" |
64 | | - , ModuleName.descriptor "moduleName" |
65 | | - , Hlint.descriptor "hlint" |
66 | | - ] |
67 | | - examplePlugins = |
68 | | - [Example.descriptor "eg" |
69 | | - ,Example2.descriptor "eg2" |
70 | | - ] |
71 | | - |
72 | | --- --------------------------------------------------------------------- |
73 | 12 |
|
74 | 13 | main :: IO () |
75 | 14 | main = do |
|
0 commit comments