loadParserSync
function loadParserSync(options): string[];
Load tree-sitter parsers synchronizely.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Load options. |
Returns
string[]
It returns all the loaded parser names.
See
Throws
Throws TypeError if options is an invalid option, throws Error if failed to load.
Example
// Load `tree-sitter-c` parser synchronizely.
const parserNames = Rsvim.syn.loadParserSync({grammarPath: "./tree-sitter-c"});
Rsvim.cmd.echo(`Loaded parsers: ${parserNames}`);