hls-tactics-plugin 1.6.2.0 → 1.7.0.0
raw patch · 3 files changed
+21/−6 lines, 3 filesdep +hls-refactor-plugindep ~ghcidedep ~hls-plugin-apidep ~hls-test-utils
Dependencies added: hls-refactor-plugin
Dependency ranges changed: ghcide, hls-plugin-api, hls-test-utils
Files
- hls-tactics-plugin.cabal +13/−4
- src/Wingman/LanguageServer.hs +1/−0
- src/Wingman/Plugin.hs +7/−2
hls-tactics-plugin.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 category: Development name: hls-tactics-plugin-version: 1.6.2.0+version: 1.7.0.0 synopsis: Wingman plugin for Haskell Language Server description: Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -25,6 +25,10 @@ manual: True library+ if impl(ghc >= 9.3)+ buildable: False+ else+ buildable: True hs-source-dirs: src exposed-modules: Ide.Plugin.Tactic@@ -82,9 +86,10 @@ , ghc-boot-th , ghc-exactprint , ghc-source-gen ^>=0.4.1- , ghcide ^>=1.7+ , ghcide ^>= 1.8 , hls-graph- , hls-plugin-api ^>=1.4+ , hls-plugin-api ^>=1.5+ , hls-refactor-plugin , hyphenation , lens , lsp@@ -126,6 +131,10 @@ ViewPatterns test-suite tests+ if impl(ghc >= 9.3)+ buildable: False+ else+ buildable: True type: exitcode-stdio-1.0 main-is: Main.hs other-modules:@@ -160,7 +169,7 @@ , ghcide , hls-plugin-api , hls-tactics-plugin- , hls-test-utils ^>=1.3+ , hls-test-utils ^>=1.4 , hspec , hspec-expectations , lens
src/Wingman/LanguageServer.hs view
@@ -34,6 +34,7 @@ import qualified Development.IDE.Core.Shake as IDE import Development.IDE.Core.UseStale import Development.IDE.GHC.Compat hiding (empty)+import Development.IDE.GHC.Compat.ExactPrint import qualified Development.IDE.GHC.Compat.Util as FastString import Development.IDE.GHC.Error (realSrcSpanToRange) import Development.IDE.GHC.ExactPrint hiding (LogShake, Log)
src/Wingman/Plugin.hs view
@@ -3,6 +3,8 @@ import Control.Monad import Development.IDE.Core.Shake (IdeState (..))+import Development.IDE.Plugin.CodeAction+import qualified Development.IDE.GHC.ExactPrint as E import Ide.Types import Language.LSP.Types import Prelude hiding (span)@@ -15,17 +17,20 @@ import Wingman.StaticPlugin import Development.IDE.Types.Logger (Recorder, cmapWithPrio, WithPriority, Pretty (pretty)) -newtype Log+data Log = LogWingmanLanguageServer WingmanLanguageServer.Log + | LogExactPrint E.Log deriving Show instance Pretty Log where pretty = \case LogWingmanLanguageServer log -> pretty log+ LogExactPrint exactPrintLog -> pretty exactPrintLog descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeState descriptor recorder plId- = installInteractions+ = mkExactprintPluginDescriptor (cmapWithPrio LogExactPrint recorder)+ $ installInteractions ( emptyCaseInteraction : fmap makeTacticInteraction [minBound .. maxBound] )