@@ -107,6 +107,7 @@ function activateHieNoCheck(context: ExtensionContext, folder: WorkspaceFolder,
107
107
let hieExecutablePath = workspace . getConfiguration ( 'languageServerHaskell' , uri ) . hieExecutablePath ;
108
108
let customWrapperPath = workspace . getConfiguration ( 'languageServerHaskell' , uri ) . useCustomHieWrapperPath ;
109
109
const logLevel = workspace . getConfiguration ( 'languageServerHaskell' , uri ) . trace . server ;
110
+ const logFile = workspace . getConfiguration ( 'languageServerHaskell' , uri ) . logFile ;
110
111
111
112
// Substitute path variables with their corresponding locations.
112
113
if ( useCustomWrapper ) {
@@ -140,17 +141,15 @@ function activateHieNoCheck(context: ExtensionContext, folder: WorkspaceFolder,
140
141
const serverPath =
141
142
useCustomWrapper || hieExecutablePath ? hieLaunchScript : context . asAbsolutePath ( path . join ( '.' , hieLaunchScript ) ) ;
142
143
143
- const tempDir = os . tmpdir ( ) ;
144
- const runArgs = [ ] ;
144
+ const runArgs : string [ ] = [ ] ;
145
145
let debugArgs : string [ ] = [ ] ;
146
146
if ( logLevel === 'verbose' ) {
147
- debugArgs = [ '-d' , '-l' , path . join ( tempDir , 'hie.log' ) , '- -vomit'] ;
147
+ debugArgs = [ '-d' , '--vomit' ] ;
148
148
} else if ( logLevel === 'messages' ) {
149
- debugArgs = [ '-d' , '-l' , path . join ( tempDir , 'hie.log' ) ] ;
149
+ debugArgs = [ '-d' ] ;
150
150
}
151
- if ( ! useCustomWrapper && hieExecutablePath !== '' ) {
152
- runArgs . unshift ( '--lsp' ) ;
153
- debugArgs . unshift ( '--lsp' ) ;
151
+ if ( logFile !== '' ) {
152
+ debugArgs = debugArgs . concat ( [ '-l' , logFile ] ) ;
154
153
}
155
154
156
155
// If the extension is launched in debug mode then the debug server options are used,
0 commit comments