Commit Graph

4256 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
8437f3ff7f Only load TextMate packages as needed in specs
Also: when a TextMate package is deactivated, remove its grammars
2013-03-26 17:35:42 -06:00
Corey Johnson & Nathan Sobo
8340a084d3 Kill vestiges of CSON from TextMatePackage 2013-03-26 17:35:42 -06:00
Nathan Sobo
bb8b3782b9 Serialize package states independently of RootView
Previously, package specs needed to deactivate the root view to test
their package serialization. Now, specs can just deactivate and then
reactivate the package, relying on serialization infrastructure that's
independent of the lifecycle of the RootView.
2013-03-26 17:35:42 -06:00
Nathan Sobo
f5774972e9 Add atom.deactivatePackage(id)
It serializes the package state to the atom.packageStates hash when
the package is deactivated, which means we will be able to test 
package serialization independent of the overall window lifecycle by
just deactivating and re-activating the package.
2013-03-26 17:35:42 -06:00
Nathan Sobo
4510d31301 Pass options through when loading packages 2013-03-26 17:35:42 -06:00
Nathan Sobo
58ef6c6582 Use atom.activatePackage directly in specs 2013-03-26 17:35:42 -06:00
Nathan Sobo
054626a9a2 Add 'immediate' option to atom.activatePackage to suppress deferral 2013-03-26 17:35:42 -06:00
Nathan Sobo
6e238967a4 💄 Rearrange methods 2013-03-26 17:35:42 -06:00
Nathan Sobo
ae444d1ea3 Add atom.activatePackage(id) method
It will load the specified package if it hasn't already been loaded.
2013-03-26 17:35:42 -06:00
Nathan Sobo
b64f5b2a85 Add atom.loadPackage(id). Rewrite loadPackages in terms of it. 2013-03-26 17:35:42 -06:00
Nathan Sobo
c51f1d2c52 💄 2013-03-26 17:35:41 -06:00
Nathan Sobo
d3099cb682 Don't add grammars for atom packages until activate is called 2013-03-26 17:35:41 -06:00
Nathan Sobo
bf7e586e6a Don't apply stylesheets until active is called for atom packages 2013-03-26 17:35:41 -06:00
Nathan Sobo
af06575aad Don't add AtomPackage keymaps until activate is called 2013-03-26 17:35:41 -06:00
Nathan Sobo
7a4f5ad9d1 Wait until TextMate packages are activated to add grammars/properties
My plan is to cache the loading of packages so we don't have to load
them from the disk repeatedly in specs. The first step of this is
ensuring that load has no side-effects.
2013-03-26 17:35:41 -06:00
Kevin Sawicki
8cbccafe08 Upgrade to git-utils 0.8.0 2013-03-26 17:08:00 -04:00
Kevin Sawicki
4e9b33075f Upgrade to ctags 0.3.0 2013-03-26 17:03:33 -04:00
Kevin Sawicki
6d2805d782 Drop extension from requireStylesheet() 2013-03-26 00:15:32 -04:00
Kevin Sawicki
fab5842651 Support requiring stylesheets without an extension
Stylesheets will attempt to be resolved with both css
and less extensions if no extension is included in the
path specified to requireStylesheet().
2013-03-26 00:11:11 -04:00
Kevin Sawicki
0887ec2e55 Move fuzzy finder stylesheet into package directory 2013-03-25 22:58:40 -04:00
Kevin Sawicki
68dc76def3 Move command panel stylesheet into package directory 2013-03-25 22:56:51 -04:00
Kevin Sawicki
5a4108f3c8 Consolidate tree-view stylesheets 2013-03-25 22:56:00 -04:00
Kevin Sawicki
a83cb88630 Move tabs stylesheet into package directory 2013-03-25 22:54:45 -04:00
Kevin Sawicki
a52c516c88 Move status bar stylesheet into package directory 2013-03-25 22:53:42 -04:00
Kevin Sawicki
3514ee5659 Remove unused event.coffee 2013-03-25 18:06:54 -04:00
Kevin Sawicki
6f8c07e917 Enforce stricter requirements for Editor.getPane()
Previously it would return the closest '.pane' element
which would cause an editor inside of another editor
to report having a pane such as in the autocomplete view.
2013-03-25 17:10:33 -04:00
Kevin Sawicki
67adce6a99 Perform directory check with single stat call 2013-03-25 16:54:39 -04:00
Kevin Sawicki
513ed3b4b1 Show symlink file icon in tree view 2013-03-25 16:51:39 -04:00
Corey Johnson
ec4bb162c3 Add editor.showLineNumbers config option
Also adds toggle-line-numbers command. Closes #377
2013-03-25 10:38:06 -07:00
Kevin Sawicki
7756f8e86d Show ignored icon in status bar 2013-03-25 12:00:11 -04:00
Kevin Sawicki
9604d81ec8 Update titles after adding/removing tabs
The duplicate title detection requires the tab be on the DOM
so update the title after it is inserted and also update titles
of remaining tabs after one is removed so long titles being used
can go back to short titles if no other tab title duplicates exist.

Closes #446
2013-03-25 11:32:37 -04:00
Kevin Sawicki
0080e09065 Only check for back references in end patterns
Back references can occur in match values but should not
be treated differently when present there since they refer
to groups inside the match.

Close #370
2013-03-24 23:25:00 -04:00
Kevin Sawicki
36e7351ba3 💄 2013-03-23 09:01:02 -07:00
Kevin Sawicki
7a56d4080c Hide the grammar name when it is the null grammar 2013-03-23 09:00:54 -07:00
Kevin Sawicki
e0a93ed1c2 Emit a grammar-changed event from edit session
This event is now listened for from the editor and
re-emitted under the editor namespace.  This removes
the need to monitor the syntax's grammars-loaded event
from both places and also mirrors the behavior of the
path-changed event.
2013-03-23 09:00:44 -07:00
Nathan Sobo
adcfcb7897 Trigger 'grammars-loaded' when TextMate packages finish loading
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.
2013-03-22 17:35:35 -06:00
Nathan Sobo
a05405370c Serialize the syntax object's grammar overrides with window state 2013-03-22 17:35:35 -06:00
Corey Johnson & Nathan Sobo
db4420e068 Move grammar overrides to syntax (no serialization yet) 2013-03-22 17:35:35 -06:00
Corey Johnson & Nathan Sobo
dacb00ed67 Simplify grammar selection and its specs 2013-03-22 17:35:34 -06:00
Corey Johnson & Nathan Sobo
bfd2667c51 Don't throw exceptions from Directory.getEntries for non-files
Just don't create entry objects for them.
2013-03-22 17:35:34 -06:00
Nathan Sobo
2416ff19a4 Add NullGrammar to obviate synchronous load of text grammar on start
It's also an extremely simple grammar, so we'll do less work to
initially tokenize open buffers before loading their real grammars.
2013-03-22 17:35:34 -06:00
Nathan Sobo
a2f72882d7 Rename grammarForFilePath to selectGrammar
The old name was misleading because it the decision is based on the
file contents in some circumstances.
2013-03-22 17:35:27 -06:00
Nathan Sobo
ab934cfbfb Replace LoadTextMatePackagesTask with async grammar loading 2013-03-22 15:29:07 -06:00
Nathan Sobo
8e57ee2776 Import Node's fs in text-mate-package; rename existing fs to fsUtils 2013-03-22 15:29:07 -06:00
Nathan Sobo
d3ead2a0d1 Update fs.list to use readdirSync and filterExtensions helper 2013-03-22 15:29:07 -06:00
Nathan Sobo
a5dcd71548 Add fs.listAsync 2013-03-22 15:29:07 -06:00
Corey Johnson
93bef861df Remove unused stdlib files 2013-03-22 13:51:09 -07:00
John Barnette
7e6dc68bca We have node now, so kill our path module 2013-03-22 13:51:09 -07:00
Kevin Sawicki & Nathan Sobo
e23edd02fd Use flexbox to position editor's gutter and scroll view
This removes the need to compute the width of the gutter based
on the line count in the editor and also removes the need to
set the scroll view's left position manually.
2013-03-22 12:47:56 -07:00
Corey Johnson & Nathan Sobo
84fe0a384d Pop grammar rules that result in infinite loops 2013-03-22 11:42:47 -07:00