Skip to content

Commit ed7075a

Browse files
committed
Split out the explicit imports plugin
1 parent f8fdf2a commit ed7075a

File tree

7 files changed

+34
-4
lines changed

7 files changed

+34
-4
lines changed

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ packages:
55
./hls-plugin-api
66
./plugins/tactics
77
./plugins/hls-hlint-plugin
8+
./plugins/hls-explicit-imports-plugin
89

910
source-repository-package
1011
type: git

exe/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Ide.Plugin.Example2 as Example2
1818
import Ide.Plugin.Floskell as Floskell
1919
import Ide.Plugin.Fourmolu as Fourmolu
2020
import Ide.Plugin.GhcIde as GhcIde
21-
import Ide.Plugin.ImportLens as ImportLens
21+
import Ide.Plugin.ExplicitImports as ExplicitImports
2222
import Ide.Plugin.Ormolu as Ormolu
2323
import Ide.Plugin.Retrie as Retrie
2424
import Ide.Plugin.StylishHaskell as StylishHaskell
@@ -60,7 +60,7 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
6060
, Brittany.descriptor "brittany"
6161
#endif
6262
, Eval.descriptor "eval"
63-
, ImportLens.descriptor "importLens"
63+
, ExplicitImports.descriptor "explicitImports"
6464
, ModuleName.descriptor "moduleName"
6565
, Hlint.descriptor "hlint"
6666
]

haskell-language-server.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ executable haskell-language-server
8888
Ide.Plugin.Example2
8989
Ide.Plugin.Floskell
9090
Ide.Plugin.Fourmolu
91-
Ide.Plugin.ImportLens
9291
Ide.Plugin.ModuleName
9392
Ide.Plugin.Ormolu
9493
Ide.Plugin.Pragmas
@@ -123,6 +122,7 @@ executable haskell-language-server
123122
, hls-hlint-plugin
124123
, hls-plugin-api
125124
, hls-tactics-plugin
125+
, hls-explicit-imports-plugin
126126
, lens
127127
, ormolu ^>=0.1.2
128128
, regex-tdfa

nix/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ let
2020
hls-plugin-api = ../hls-plugin-api;
2121
hls-tactics-plugin = ../plugins/tactics;
2222
hls-hlint-plugin = ../plugins/hls-hlint-plugin;
23+
hls-explicit-imports-plugin = ../plugins/hls-explicit-imports-plugin;
2324
});
2425
in
2526
{
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
cabal-version: 2.2
2+
name: hls-explicit-imports-plugin
3+
version: 0.1.0.0
4+
synopsis: Explicit imports plugin for Haskell Language Server
5+
license: Apache-2.0
6+
license-file: LICENSE
7+
author: Pepe Iborra
8+
maintainer: pepeiborra@gmail.com
9+
category: Development
10+
build-type: Simple
11+
12+
library
13+
exposed-modules: Ide.Plugin.ExplicitImports
14+
hs-source-dirs: src
15+
build-depends: aeson
16+
, base
17+
, containers
18+
, deepseq
19+
, haskell-lsp-types
20+
, hls-plugin-api
21+
, ghc
22+
, ghcide
23+
, shake
24+
, text
25+
, unordered-containers
26+
27+
default-language: Haskell2010

plugins/default/src/Ide/Plugin/ImportLens.hs renamed to plugins/hls-explicit-imports-plugin/src/Ide/Plugin/ExplicitImports.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "ghc-api-version.h"
1515

16-
module Ide.Plugin.ImportLens (descriptor) where
16+
module Ide.Plugin.ExplicitImports (descriptor) where
1717

1818
import Control.DeepSeq
1919
import Control.Monad.IO.Class

shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ let defaultCompiler = "ghc" + lib.replaceStrings ["."] [""] haskellPackages.ghc.
3030
p.hls-plugin-api
3131
p.hls-tactics-plugin
3232
p.hls-hlint-plugin
33+
p.hls-explicit-imports-plugin
3334
];
3435

3536
isSupported = compiler == "default" || compiler == defaultCompiler;

0 commit comments

Comments
 (0)