File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import Language.Haskell.Brittany
1212import Language.Haskell.LSP.Types as J
1313import qualified Language.Haskell.LSP.Types.Lens as J
1414import Ide.Plugin.Formatter
15+ import Ide.PluginUtils
1516import Ide.Types
1617
1718import System.FilePath
@@ -61,11 +62,6 @@ formatText confFile opts text =
6162 liftIO $ runBrittany tabSize confFile text
6263 where tabSize = opts ^. J. tabSize
6364
64- -- | Extend to the line below and above to replace newline character.
65- normalize :: Range -> Range
66- normalize (Range (Position sl _) (Position el _)) =
67- Range (Position sl 0 ) (Position (el + 1 ) 0 )
68-
6965-- | Recursively search in every directory of the given filepath for brittany.yaml.
7066-- If no such file has been found, return Nothing.
7167getConfFile :: NormalizedFilePath -> IO (Maybe FilePath )
Original file line number Diff line number Diff line change @@ -90,8 +90,3 @@ provider _lf ideState typ contents fp _ = do
9090#else
9191provider _ _ _ _ = return $ Right [] -- NOP formatter
9292#endif
93-
94- -- | Extend to the line below and above to replace newline character.
95- normalize :: Range -> Range
96- normalize (Range (Position sl _) (Position el _)) =
97- Range (Position sl 0 ) (Position (el + 1 ) 0 )
Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ import Language.Haskell.LSP.Types.Capabilities
1010import qualified Language.Haskell.LSP.Types as J
1111import Language.Haskell.LSP.Types
1212
13+ -- ---------------------------------------------------------------------
14+
15+ -- | Extend to the line below and above to replace newline character.
16+ normalize :: Range -> Range
17+ normalize (Range (Position sl _) (Position el _)) =
18+ Range (Position sl 0 ) (Position (el + 1 ) 0 )
19+
20+ -- ---------------------------------------------------------------------
21+
1322data WithDeletions = IncludeDeletions | SkipDeletions
1423 deriving Eq
1524
You can’t perform that action at this time.
0 commit comments