File tree 1 file changed +2
-3
lines changed
plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/Completion/Completer
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
module Ide.Plugin.Cabal.Completion.Completer.Paths where
2
2
3
3
import qualified Data.List as List
4
+ import Data.List.Extra (dropPrefix )
4
5
import qualified Data.Text as T
5
6
import Distribution.PackageDescription (Benchmark (.. ),
6
7
BuildInfo (.. ),
@@ -15,8 +16,6 @@ import Distribution.Utils.Path (getSymbolicPath)
15
16
import Ide.Plugin.Cabal.Completion.Types
16
17
import qualified System.FilePath as FP
17
18
import qualified System.FilePath.Posix as Posix
18
- import Data.List.Extra (dropPrefix )
19
- import Data.List (isPrefixOf )
20
19
21
20
22
21
{- | Information used to query and build path completions.
@@ -62,7 +61,7 @@ data PathCompletionInfo = PathCompletionInfo
62
61
"./dir1/dir2" -> ("./dir1/","dir2")
63
62
-}
64
63
splitFileNameNoTrailingSlash :: FilePath -> (String , String )
65
- splitFileNameNoTrailingSlash prefix = rmTrailingSlash (" ./" `isPrefixOf` prefix) (Posix. splitFileName prefix)
64
+ splitFileNameNoTrailingSlash prefix = rmTrailingSlash (" ./" `List. isPrefixOf` prefix) (Posix. splitFileName prefix)
66
65
where rmTrailingSlash hadTrailingSlash (queryDirectory', pathSegment')
67
66
| hadTrailingSlash = (queryDirectory', pathSegment')
68
67
| otherwise = (" ./" `dropPrefix` queryDirectory', pathSegment')
You can’t perform that action at this time.
0 commit comments