import { commands , ExtensionContext , window } from 'coc.nvim' ; import { Ctx } from './ctx' ; export async function activate ( context ) { const ctx = new Ctx ( context ) ; if ( ! ctx . config . enabled ) return ; const bin = ctx . resolveJuliaBin ( ) ; if ( ! bin ) { window . showMessage ( `Can't find julia` , 'warning' ) ; return ; } await ctx . startServer ( ) ; context . subscriptions . push ( commands . registerCommand ( 'julia.CompileLanguageServerBin' , async ( ) => { await ctx . compileServerBin ( ) ; } ) , commands . registerCommand ( 'julia.CompileLanguageServerSysimg' , async ( ) => { await ctx . compileServerSysimg ( ) ; } ) ) ; }