Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Load TextMate grammars with async I/O instead of a worker thread #448

Merged
merged 11 commits into from
Mar 22, 2013

Conversation

nathansobo
Copy link
Contributor

This isn't quite how I'd like it because it still emits a global 'grammars-loaded' event after all the packages have been loaded. It uses a queue to serialize the loading of each package's grammars, then emits this event when the queue is empty. Instead, I'd like to fire an event every time a grammar is added and have a LanguageMode switch to that grammar if it is a better match. Then any time a grammar is added we can respond appropriately with the currently open edit sessions. But I want to clean up package loading first so this was a good way to get this merged to master now.

Nathan Sobo and others added 11 commits March 22, 2013 15:29
The old name was misleading because it the decision is based on the
file contents in some circumstances.
It's also an extremely simple grammar, so we'll do less work to
initially tokenize open buffers before loading their real grammars.
Just don't create entry objects for them.
This is a temporary solution so we can merge async textmate package
loading. I'd like to dispense with this event and consider each
grammar individually as they are loaded. But this makes the behavior
compatible with the old background-task-based behavior.
@nathansobo nathansobo merged commit adcfcb7 into master Mar 22, 2013
@nathansobo nathansobo deleted the async-textmate-package-loading branch March 22, 2013 23:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants