import { AutoLanguageClient } from "atom-languageclient" ; class DLanguageClient extends AutoLanguageClient { async activate ( ) { super . activate ( ) ; if ( ! atom . packages . isPackageLoaded ( "atom-ide-base" ) ) { await ( await import ( "atom-package-deps" ) ) . install ( "ide-d" , true ) ; atom . packages . enablePackage ( "atom-ide-base" ) ; atom . notifications . addSuccess ( "ide-d: atom-ide-base was installed and enabled..." ) ; } } getGrammarScopes ( ) { return [ "source.d" , "D" ] ; } getLanguageName ( ) { return "D" ; } getServerName ( ) { return "serve-d" ; } getConnectionType ( ) { return "stdio" ; } async startServerProcess ( projectPath ) { const { installServeD } = await import ( "./installation" ) ; const serveDPath = await installServeD ( ) ; const serveD = super . spawn ( serveDPath , [ "--require" , "workspaces" ] , { cwd : projectPath , } ) ; return serveD ; } } module . exports = new DLanguageClient ( ) ;