@@ -68,13 +68,33 @@ async function activateHie(context: ExtensionContext, document: TextDocument) {
68
68
}
69
69
70
70
try {
71
+ const hieVariant = workspace . getConfiguration ( 'languageServerHaskell' , uri ) . hieVariant ;
71
72
const hieExecutablePath = workspace . getConfiguration ( 'languageServerHaskell' , uri ) . hieExecutablePath ;
72
73
// Check if hie is installed.
73
- const exeName = 'hie' ;
74
+ let exeName = 'hie' ;
75
+ switch ( hieVariant ) {
76
+ case 'haskell-ide-engine' :
77
+ break ;
78
+ case 'haskell-language-server' :
79
+ case 'ghcide' :
80
+ exeName = hieVariant ;
81
+ break ;
82
+ }
74
83
if ( ! await isHieInstalled ( exeName ) && hieExecutablePath === '' ) {
75
84
// TODO: Once haskell-ide-engine is on hackage/stackage, enable an option to install it via cabal/stack.
85
+ let hieProjectUrl = '/haskell/haskell-ide-engine' ;
86
+ switch ( hieVariant ) {
87
+ case 'haskell-ide-engine' :
88
+ break ;
89
+ case 'haskell-language-server' :
90
+ hieProjectUrl = '/haskell/haskell-language-server' ;
91
+ break ;
92
+ case 'ghcide' :
93
+ hieProjectUrl = '/digital-asset/ghcide' ;
94
+ break ;
95
+ }
76
96
const notInstalledMsg : string =
77
- exeName + ' executable missing, please make sure it is installed, see github.com/haskell/haskell-ide-engine .' ;
97
+ exeName + ' executable missing, please make sure it is installed, see https:// github.com' + hieProjectUrl + ' .';
78
98
const forceStart : string = 'Force Start' ;
79
99
window . showErrorMessage ( notInstalledMsg , forceStart ) . then ( option => {
80
100
if ( option === forceStart ) {
@@ -141,7 +161,7 @@ function activateHieNoCheck(context: ExtensionContext, folder: WorkspaceFolder,
141
161
142
162
const runArgs : string [ ] = [ '--lsp' ] ;
143
163
let debugArgs : string [ ] = [ '--lsp' ] ;
144
-
164
+
145
165
// ghcide does not accept -d and -l params
146
166
if ( hieVariant !== 'ghcide' ) {
147
167
if ( logLevel === 'messages' ) {
0 commit comments