Skip to content

Commit 9e9acd8

Browse files
Support 'csharp.omnisharpUsesMono' option
1 parent 7c25383 commit 9e9acd8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/omnisharp/server.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export abstract class OmnisharpServer {
149149

150150
return {
151151
path: config.get<string>('omnisharp'),
152-
usesMono: config.get<boolean>('usesMono')
152+
usesMono: config.get<boolean>('omnisharpUsesMono')
153153
}
154154
}
155155

@@ -269,7 +269,15 @@ export abstract class OmnisharpServer {
269269
// --- start, stop, and connect
270270

271271
private _start(launchTarget: LaunchTarget): Promise<void> {
272-
let flavor = getDefaultFlavor(launchTarget.kind);
272+
const options = this._readOptions();
273+
274+
let flavor: omnisharp.Flavor;
275+
if (options.path !== undefined && options.usesMono === true) {
276+
flavor = omnisharp.Flavor.Mono;
277+
}
278+
else {
279+
flavor = getDefaultFlavor(launchTarget.kind);
280+
}
273281

274282
return this._getServerPath(flavor).then(serverPath => {
275283
this._setState(ServerState.Starting);

0 commit comments

Comments
 (0)