Commit Graph

2264 Commits

Author SHA1 Message Date
Nathan Sobo
89fe8e1628 Add TextMateGrammar.tokenizeLines convenience method
It can be used in specs to test parsing. It takes a block of text,
splits it into lines, and then tokenizes them, returning an array
of token arrays, one for each line.
2013-04-25 17:15:27 -06:00
Nathan Sobo
7e0ac1db9c Default TokenizedBuffer options hash to {} 2013-04-25 17:15:27 -06:00
Nathan Sobo
0d78098dbf Make TokenizedBuffer select its own grammar, not LanguageMode
This is part of an effort to disentangle LanguageMode, DisplayBuffer,
and TokenizedBuffer. It should be easy to create a DisplayBuffer
without creating an EditSession… let's get the dependencies flowing
in a single direction.
2013-04-25 15:13:00 -06:00
Nathan Sobo
ee31114b32 💄 whitespace 2013-04-25 14:06:53 -06:00
Nathan Sobo
0f623b3d08 Move structural folding logic to LanguageMode
DisplayBuffer should just focus on providing basic support for folding.
Scanning the structure of the code, looking at scopes, etc is more the
domain of the LanguageMode object.
2013-04-25 14:06:53 -06:00
Nathan Sobo
1ac55413d9 Define class properties with :, not = 2013-04-25 14:06:53 -06:00
Nathan Sobo
ca3b0c97da 💄 getter renames 2013-04-25 14:06:52 -06:00
Kevin Sawicki
c50b7fd99e 💄 2013-04-25 11:27:59 -07:00
Kevin Sawicki
875555d933 Rename invisible class to invisible-character
Bootstrap defines this class with visibility: hidden
which we don't want since invisible characters should
be visible.
2013-04-25 10:02:33 -07:00
Corey Johnson & Nathan Sobo
cd7162b3bc Fix event emitter error
Introduced in 9cc4c2e5de because
of botched merge conflict resolution
2013-04-24 14:17:47 -07:00
Corey Johnson & Nathan Sobo
96e91f5fa1 Use correct case when requiring subscriber 2013-04-24 14:15:09 -07:00
Corey Johnson & Nathan Sobo
24ce415283 Move event listener calls from resetDisplay to edit
Fixes #140
2013-04-24 11:41:56 -07:00
probablycorey
2a6c4b04b1 Lower case custom attribute linenumber.
All attribute names on HTML elements in HTML documents get ASCII-lowercased
automatically, so the restriction on ASCII uppercase letters doesn't affect such
documents. Via http://www.w3.org/html/wg/drafts/html/master/single-page.html
2013-04-24 11:41:56 -07:00
probablycorey
9cc4c2e5de Allow off to be called before on without error
Previously calling `something.off 'event-name', handler` would throw
an error unless `on` was called first.
2013-04-24 11:41:56 -07:00
Kevin Sawicki
b65e1485a7 Copy folders to ~/.atom directory asynchronously 2013-04-24 10:12:30 -07:00
Kevin Sawicki
1c8509b873 Look for .json extension first 2013-04-24 10:12:30 -07:00
Kevin Sawicki
044396d41a Remove unneeded empty array fallback 2013-04-24 10:12:30 -07:00
Kevin Sawicki
41229f50f7 Look for .json extension first 2013-04-24 10:12:29 -07:00
Kevin Sawicki
1368026db2 Remove measure calls 2013-04-24 10:12:29 -07:00
Kevin Sawicki
fc00688454 Use fsUtils.readObject() to read theme metadata 2013-04-24 10:12:29 -07:00
Kevin Sawicki
2f5a99fac2 Install atom command asynchronously 2013-04-24 10:12:29 -07:00
Kevin Sawicki
d92db4a7a8 💄 2013-04-24 10:12:29 -07:00
Kevin Sawicki
7ef87cb6c4 Load scoped properties asynchronously 2013-04-24 10:12:29 -07:00
Kevin Sawicki
001fef384c Remove extra initialization of scoped properties 2013-04-24 10:12:29 -07:00
Kevin Sawicki
ab2a298994 💄 2013-04-24 10:12:28 -07:00
Kevin Sawicki
bef3c50fe5 Load scoped properties after grammars load 2013-04-24 10:12:28 -07:00
Garen Torikian
3087fabc21 Merge pull request #511 from github/no-trim-whitespace
Leave Markdown files alone when trimming whitespace
2013-04-23 17:22:37 -07:00
Garen Torikian
f85e1ccf9a modify whitespace replace fn directly 2013-04-23 17:15:19 -07:00
Garen Torikian
7940820877 Update display-buffer.coffee 2013-04-23 15:41:02 -07:00
Garen Torikian
e4eea237b5 Update display-buffer.coffee 2013-04-23 15:37:14 -07:00
Nathan Sobo
1d6c2cdf27 In documentation strings ,s/Integer/Number/g 2013-04-23 16:30:23 -06:00
Nathan Sobo
c51db80d6e Some more docs fixes
/cc @gjtorikian
2013-04-23 16:17:36 -06:00
Nathan Sobo
38c2509927 Fix some documentation 2013-04-23 16:11:15 -06:00
Corey Johnson & Nathan Sobo
caed3d39de Revert "Don't tokenize files that have more than 10000 lines"
This was a premature optimization. The real problem is
with the spell-check package.

This reverts commit 987d1da233.
2013-04-23 13:50:02 -07:00
Corey Johnson & Nathan Sobo
693a495618 Use _.spliceWithArray in tokenized buffer 2013-04-23 12:01:16 -07:00
Corey Johnson & Nathan Sobo
987d1da233 Don't tokenize files that have more than 10000 lines 2013-04-23 12:00:57 -07:00
Corey Johnson & Nathan Sobo
840efa3d82 Use _.spliceWithArray when splicing in new lines 2013-04-23 11:19:54 -07:00
Kevin Sawicki
1ccf026a83 Set/get text using edit session instead of buffer 2013-04-23 08:54:43 -07:00
Kevin Sawicki
2d897ba415 Remove trailing whitespace 2013-04-23 08:54:18 -07:00
Kevin Sawicki
c3045dd230 doc: tweak eventNames param description 2013-04-23 08:42:33 -07:00
Kevin Sawicki & Nathan Sobo
e50aa56d02 Space separate event names 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo
228fa1abe5 Store injections grammars on Syntax global 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo
125c41a2e2 Support space-separated event names in EventEmitter.on()/off() 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo
b9ad462c69 Retokenize when grammar with matching injection selector is updated 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo
0d35943386 Retokenize when grammar with matching injection selector is loaded 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo
b1527a7982 Add getter and setter for buffer text 2013-04-23 08:39:26 -07:00
Kevin Sawicki
eec6518278 Add package to open links on ctrl-O 2013-04-23 08:39:26 -07:00
Kevin Sawicki
f0cf337857 Support grammars with an injectionSelector
These grammars can now contribute rules to other grammars when
their selector matches the current scope stack.
2013-04-23 08:39:26 -07:00
Kevin Sawicki
927e9c3de8 Upgrade to oniguruma 0.11 2013-04-23 08:39:25 -07:00
Kevin Sawicki
4acb3acebc Use substring instead of substr 2013-04-23 08:39:25 -07:00