Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
vscode.workspace.createFileSystemWatcher('**/*.app.src'),
vscode.workspace.createFileSystemWatcher('**/rebar.config')
]
}
}
let escriptPath = await getEscriptPath()
// Create the language client and start it.
let client = new LanguageClient('Erlang Server',
() => {
return startServer(extensionPath, escriptPath, channel)
},
clientOptions)
client.registerProposedFeatures();
client.trace = Trace.Verbose;
client.onReady().then(() => { console.log('Erlang server ready!') },
(reason) => { throw Error('Erlang server error: ' + reason) })
return client.start()
}
fileEvents: this._fsWatcher,
configurationSection: 'papyrus',
},
};
// In order to find the new process id, we need to exclude any current running instances of the language server.
let existingProcessIds: number[];
if (process.platform === 'win32' && process.env['PAPYRUS_EXTENSION_DEBUG']) {
const processes = await psList();
existingProcessIds = processes.filter((p) => p.name === 'DarkId.Papyrus.Host.exe').map((p) => p.pid);
}
// Create the language client and start the client.
this._client = new LanguageClient('papyrus', 'Papyrus Language Service', this._serverOptions, clientOptions);
this._client.trace = Trace.Verbose;
this._client.start();
await this._client.onReady();
if (process.platform === 'win32' && process.env['PAPYRUS_EXTENSION_DEBUG']) {
const processes = await psList();
const serverProcessId = processes.find(
(p) => p.name === 'DarkId.Papyrus.Host.exe' && existingProcessIds.indexOf(p.pid) === -1
)!.pid;
if (serverProcessId) {
exec(`vsjitdebugger.exe -p ${serverProcessId}`);
}
}
}
fileEvents: this._fsWatcher,
configurationSection: 'papyrus',
},
};
// In order to find the new process id, we need to exclude any current running instances of the language server.
let existingProcessIds: number[];
if (process.platform === 'win32' && process.env['PAPYRUS_EXTENSION_DEBUG']) {
const processes = await psList();
existingProcessIds = processes.filter((p) => p.name.startsWith('DarkId.Papyrus.Host')).map((p) => p.pid);
}
// Create the language client and start the client.
this._client = new LanguageClient('papyrus', 'Papyrus Language Service', this._serverOptions, clientOptions);
this._client.trace = Trace.Verbose;
this._clientDisposable = this._client.start();
await this._client.onReady();
if (!this._clientDisposable) {
return;
}
if (process.platform === 'win32' && process.env['PAPYRUS_EXTENSION_DEBUG']) {
const processes = await psList();
const serverProcessId = processes.find(
(p) => p.name.startsWith('DarkId.Papyrus.Host') && existingProcessIds.indexOf(p.pid) === -1
)!.pid;
if (serverProcessId) {
exec(`vsjitdebugger.exe -p ${serverProcessId}`);
function chosenTrace(): Trace {
let config = vscode.workspace.getConfiguration("autousing").get("trace.server");
switch (config) {
case "off": return Trace.Off;
case "messages": return Trace.Messages;
case "verbose": return Trace.Verbose;
}
}