You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm trying to use a grammar file with "\n" line-endings on Windows (where usually it's "\r\n"), then reading a grammar file fails with this error
F:\dev\EditorSyntax\node-test\node_modules\vscode-textmate\release\main.js:1573
var injections = this._locator.getInjections(rawGrammar.scopeName);
^
TypeError: Cannot read property 'scopeName' of null
at Registry.loadGrammarFromPathSync (F:\dev\EditorSyntax\node-test\node_modules\vscode-textmate\release\main.js:1573:64)
at tokenizeCodeSnippet (F:\dev\EditorSyntax\node-test\index.js:33:31)
at Main (F:\dev\EditorSyntax\node-test\index.js:53:13)
at Object.<anonymous> (F:\dev\EditorSyntax\node-test\index.js:58:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
Then, if I replace line-ends, everything works fine.
Activity
alexdima commentedon Sep 7, 2016
Can you share a minimal grammar that reproduces the problem? Is it in plist form, it could be a problem in node-fast-plist ?
vors commentedon Sep 7, 2016
I think I figured it out.
The problem is unrelated to line-ends and to vscode-textmate at all.
I have this line in my code
This call is async and file content is not created at the moment when vscode-textmate is trying to read it.
Sorry for the false alarm!