diff --git a/src/extension.ts b/src/extension.ts index 2967305..a4f4409 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -170,7 +170,7 @@ export async function startServer(context: ExtensionContext) { viperTools = normalise(viperTools, config.paths.viperToolsPath); const buildVersion = config.buildVersion || 'Stable'; const homePath = homedir(); - // Viper extension v3.0.1 + // Viper extension v4.3.1 if ( viperTools === path.resolve(homePath, 'Library/Application Support/Viper') || @@ -191,7 +191,7 @@ export async function startServer(context: ExtensionContext) { ); } // WSL tweak - if (env.remoteName === 'wsl') { + if (env.remoteName === 'wsl' || env.remoteName === 'ssh-remote') { viperTools = viperTools.replace( path.join(homePath, '.config', 'Code'), path.join(homePath, '.vscode-server', 'data'), diff --git a/src/server/motoko.ts b/src/server/motoko.ts index 96ab16a..aa4b8b1 100644 --- a/src/server/motoko.ts +++ b/src/server/motoko.ts @@ -1,8 +1,8 @@ -// import getMotoko from 'motoko/lib'; -import mo from 'motoko'; +import getMotoko from 'motoko/lib'; +// import mo from 'motoko'; process.env.MOC_UNLOCK_VERIFICATION = '1'; -// const mo = getMotoko(require('../generated/moc.js').Motoko as any); +const mo = getMotoko(require('../generated/moc.js').Motoko as any); export default mo; diff --git a/src/server/viper.ts b/src/server/viper.ts index 731f7b1..6025505 100644 --- a/src/server/viper.ts +++ b/src/server/viper.ts @@ -198,6 +198,9 @@ try { } }; server.stdout.on('data', dataListener); + server.stderr.on('data', (data) => { + console.error(`child stderr:\n${data}`); + }); } catch (err) { console.error(`Error while initializing Viper LSP: ${err}`); }