hls-fourmolu-plugin 1.1.0.0 → 1.1.1.0
raw patch · 3 files changed
+14/−18 lines, 3 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)
+ Ide.Plugin.Fourmolu: data LogEvent
Files
- hls-fourmolu-plugin.cabal +8/−13
- src/Ide/Plugin/Fourmolu.hs +4/−3
- test/Main.hs +2/−2
hls-fourmolu-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-fourmolu-plugin-version: 1.1.0.0+version: 1.1.1.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,10 +23,6 @@ location: git://github.com/haskell/haskell-language-server.git library- if impl(ghc >= 9.3)- buildable: False- else- buildable: True exposed-modules: Ide.Plugin.Fourmolu , Ide.Plugin.Fourmolu.Shim@@ -35,23 +31,22 @@ build-depends: , base >=4.12 && <5 , filepath- , fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.6 || ^>= 0.7 || ^>= 0.8+ , fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.6 || ^>= 0.7 || ^>= 0.8 || ^>= 0.9 || ^>= 0.10 , ghc , ghc-boot-th- , ghcide ^>=1.8- , hls-plugin-api ^>=1.5+ , ghcide ^>=1.8 || ^>= 1.9+ , hls-plugin-api ^>=1.5 || ^>= 1.6 , lens , lsp , process-extras >= 0.7.1 , text + -- fourmolu 0.9.0 fails to build on Windows CI for reasons unknown+ if impl(ghc >= 9.2) && os(windows) && impl(ghc < 9.4)+ build-depends: fourmolu > 0.9.0.0 || < 0.9.0.0 default-language: Haskell2010 test-suite tests- if impl(ghc >= 9.3)- buildable: False- else- buildable: True type: exitcode-stdio-1.0 default-language: Haskell2010 hs-source-dirs: test@@ -66,5 +61,5 @@ , filepath , hls-fourmolu-plugin , hls-plugin-api- , hls-test-utils ^>=1.4+ , hls-test-utils ^>=1.5 , lsp-test
src/Ide/Plugin/Fourmolu.hs view
@@ -9,6 +9,7 @@ module Ide.Plugin.Fourmolu ( descriptor, provider,+ LogEvent, ) where import Control.Exception (IOException, try)@@ -26,8 +27,7 @@ import GHC.LanguageExtensions.Type (Extension (Cpp)) import Ide.Plugin.Fourmolu.Shim import Ide.Plugin.Properties-import Ide.PluginUtils (makeDiffTextEdit,- usePropertyLsp)+import Ide.PluginUtils (makeDiffTextEdit) import Ide.Types import Language.LSP.Server hiding (defaultConfig) import Language.LSP.Types hiding (line)@@ -43,6 +43,7 @@ descriptor recorder plId = (defaultPluginDescriptor plId) { pluginHandlers = mkFormattingHandlers $ provider recorder plId+ , pluginConfigDescriptor = defaultConfigDescriptor{configCustomConfig = mkCustomConfig properties} } properties :: Properties '[ 'PropertyKey "external" 'TBoolean]@@ -58,7 +59,7 @@ fileOpts <- maybe [] (convertDynFlags . hsc_dflags . hscEnv) <$> liftIO (runAction "Fourmolu" ideState $ use GhcSession fp)- useCLI <- usePropertyLsp #external plId properties+ useCLI <- liftIO $ runAction "Fourmolu" ideState $ usePropertyAction #external plId properties if useCLI then liftIO . fmap (join . first (mkError . show))
test/Main.hs view
@@ -15,8 +15,8 @@ main :: IO () main = defaultTestRunner tests -fourmoluPlugin :: PluginDescriptor IdeState-fourmoluPlugin = Fourmolu.descriptor mempty "fourmolu"+fourmoluPlugin :: PluginTestDescriptor Fourmolu.LogEvent+fourmoluPlugin = mkPluginTestDescriptor Fourmolu.descriptor "fourmolu" tests :: TestTree tests =