Fix syntax highlighting, process spawning, extensions, terminals (#22)

* Fix syntax highlighting, process spawning, extensions, terminals

* Replace colons in toISOString

* Move pathSets included in task
This commit is contained in:
Kyle Carberry
2019-01-28 11:14:06 -06:00
parent 9b1a635d63
commit b4798d1a48
31 changed files with 300 additions and 46 deletions

View File

@@ -0,0 +1,35 @@
import * as vscodeTextmate from "../../../../lib/vscode/node_modules/vscode-textmate";
const target = vscodeTextmate as typeof vscodeTextmate;
target.Registry = class Registry extends vscodeTextmate.Registry {
public constructor(opts: vscodeTextmate.RegistryOptions) {
super({
...opts,
getOnigLib: (): Promise<vscodeTextmate.IOnigLib> => {
return new Promise<vscodeTextmate.IOnigLib>((res, rej) => {
const onigasm = require('onigasm');
const wasmUrl = require('!!file-loader!onigasm/lib/onigasm.wasm');
return fetch(wasmUrl).then(resp => resp.arrayBuffer()).then(buffer => {
return onigasm.loadWASM(buffer);
}).then(() => {
res({
createOnigScanner: function (patterns) { return new onigasm.OnigScanner(patterns); },
createOnigString: function (s) { return new onigasm.OnigString(s); }
})
}).catch(reason => rej(reason));
});
},
});
}
}
enum StandardTokenType {
Other = 0,
Comment = 1,
String = 2,
RegEx = 4,
};
// Any needed here to override const
(<any>target).StandardTokenType = StandardTokenType;