@@ -23,6 +23,7 @@ import Data.List (intercalate)
23
23
import Data.Maybe (catMaybes )
24
24
import Data.Text (Text )
25
25
import qualified Data.Text as T
26
+ import Data.Version (showVersion )
26
27
import Development.IDE hiding (pluginHandlers )
27
28
import Development.IDE.GHC.Compat as Compat hiding (Cpp , Warning ,
28
29
hang , vcat )
@@ -38,6 +39,7 @@ import Language.LSP.Protocol.Types
38
39
import Language.LSP.Server hiding (defaultConfig )
39
40
import Ormolu
40
41
import Ormolu.Config
42
+ import qualified Paths_fourmolu as Fourmolu
41
43
import System.Exit
42
44
import System.FilePath
43
45
import System.Process.Run (cwd , proc )
@@ -51,7 +53,7 @@ descriptor recorder plId =
51
53
, pluginConfigDescriptor = defaultConfigDescriptor{configCustomConfig = mkCustomConfig properties}
52
54
}
53
55
where
54
- desc = " Provides formatting of Haskell files via fourmolu. Built with fourmolu-" <> VERSION_fourmolu
56
+ desc = T. pack $ " Provides formatting of Haskell files via fourmolu. Built with fourmolu-" <> showVersion Fourmolu. version
55
57
56
58
properties :: Properties '[ 'PropertyKey " external" 'TBoolean, 'PropertyKey " path" 'TString]
57
59
properties =
@@ -77,7 +79,7 @@ provider recorder plId ideState token typ contents fp fo = ExceptT $ pluginWithI
77
79
handle @ IOException (pure . Left . PluginInternalError . T. pack . show ) $
78
80
runExceptT (cliHandler fourmoluExePath fileOpts)
79
81
else do
80
- logWith recorder Debug $ LogCompiledInVersion VERSION_fourmolu
82
+ logWith recorder Debug $ LogCompiledInVersion (showVersion Fourmolu. version)
81
83
FourmoluConfig {.. } <-
82
84
liftIO (loadConfigFile fp') >>= \ case
83
85
ConfigLoaded file opts -> do
0 commit comments