hls-fourmolu-plugin 1.1.1.0 → 2.0.0.0
raw patch · 2 files changed
+12/−5 lines, 2 filesdep ~fourmoludep ~ghcidedep ~hls-plugin-apiPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: fourmolu, ghcide, hls-plugin-api, hls-test-utils
API changes (from Hackage documentation)
Files
hls-fourmolu-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-fourmolu-plugin-version: 1.1.1.0+version: 2.0.0.0 synopsis: Integration with the Fourmolu code formatter description: Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -23,6 +23,7 @@ location: git://github.com/haskell/haskell-language-server.git library+ buildable: True exposed-modules: Ide.Plugin.Fourmolu , Ide.Plugin.Fourmolu.Shim@@ -31,11 +32,11 @@ build-depends: , base >=4.12 && <5 , filepath- , fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.6 || ^>= 0.7 || ^>= 0.8 || ^>= 0.9 || ^>= 0.10+ , fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.6 || ^>= 0.7 || ^>= 0.8 || ^>= 0.9 || ^>= 0.10 || ^>= 0.11 || ^>= 0.12 , ghc , ghc-boot-th- , ghcide ^>=1.8 || ^>= 1.9- , hls-plugin-api ^>=1.5 || ^>= 1.6+ , ghcide == 2.0.0.0+ , hls-plugin-api == 2.0.0.0 , lens , lsp , process-extras >= 0.7.1@@ -47,6 +48,7 @@ default-language: Haskell2010 test-suite tests+ buildable: True type: exitcode-stdio-1.0 default-language: Haskell2010 hs-source-dirs: test@@ -61,5 +63,5 @@ , filepath , hls-fourmolu-plugin , hls-plugin-api- , hls-test-utils ^>=1.5+ , hls-test-utils == 2.0.0.0 , lsp-test
src/Ide/Plugin/Fourmolu.hs view
@@ -5,6 +5,7 @@ {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-}+{-# LANGUAGE CPP #-} module Ide.Plugin.Fourmolu ( descriptor,@@ -101,7 +102,11 @@ else do let format fourmoluConfig = bimap (mkError . show) (makeDiffTextEdit contents)+#if MIN_VERSION_fourmolu(0,11,0)+ <$> try @OrmoluException (ormolu config fp' contents)+#else <$> try @OrmoluException (ormolu config fp' (T.unpack contents))+#endif where printerOpts = cfgFilePrinterOpts fourmoluConfig config =