Closed PaulPorfiroff closed 8 years ago
Seems like just doing TextEditor::reloadGrammar() for editors using grammars from targeted package fixes an issue.
@PaulPorfiroff Thanks for reporting! I fixed that and released new version.
Hey, @cakecatz, thanks for update. But.
It only works fine when text buffer with grammar sample has been saved to a file.
But fails for all the untitled
buffers in a workspace, reverting them to Null Grammar
after reloading.
It also randomly fails when I've got, say, two grammars with the same scopeName
(that was setup for quick tests).
I dag up Atom's sources a bit and drafted a solution to reload grammars based on grammar paths, which solves both problems.
After the targeted package has been reloaded, the GrammarRegistry updates, but currently open text editors still reference old grammars.