Commit Graph

121 Commits

Author SHA1 Message Date
Nathan Sobo
64fca5db20 Absorb exception in isFoldableCodeAtRow and report assertion failure
Can’t figure out what’s going on in this bug, but we can hopefully make
it less damaging and collect more information via the new assertion
system.

Refs #5905
2015-06-20 18:37:53 +02:00
Nathan Sobo
6bba381393 Merge pull request #7130 from atom/ns-large-file-mode
Load large files with fewer features but much better performance
2015-06-06 00:05:27 +02:00
Nathan Sobo
48ce361bd0 Select grammars based on first 10 lines of content, not the entire file 2015-06-05 22:24:49 +02:00
Nathan Sobo
56273e7eef Preserve large file mode across serialization and pane splits 2015-06-05 21:44:23 +02:00
Nathan Sobo
639647d115 Disallow fold creation in large file mode 2015-06-05 21:31:06 +02:00
Nathan Sobo
53a3239379 Use buffer coordinates in TokenizedBuffer::scopeDescriptorForPosition
Fixes #7073
2015-06-05 18:18:42 +02:00
Nathan Sobo
de508db9b2 Implement basic large file mode for editor
* Don’t tokenize
* Don’t build metadata to support folds and soft wraps

Remaining issues:

* Max line length is hard coded
* Foldable indicators should be disabled
* Folding via API should be disallowed
2015-06-05 02:25:57 +02:00
Nathan Sobo
5b494b7b17 Lazily construct placeholder lines in TokenizedBuffer 2015-06-05 02:22:44 +02:00
Nathan Sobo
31cf19a205 Use previous definition of scope selector match to fix API breakage
I switched to first-mate Selector because I didn’t want to replicate
the poorly-defined Token::matchesScopeSelector method now that tokens
are not stored on lines. However, the first-mate semantics are stricter
and that broke the API. Perhaps using selector-kit here would be better,
but I just wanted to put back exactly to how it was for now.

/cc @ypresto
2015-05-28 10:38:35 +02:00
Nathan Sobo
2379b3803f Revert "Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens""
This reverts commit 7cb0bc3bc2.
2015-05-21 19:56:52 +02:00
Nathan Sobo
7cb0bc3bc2 Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens"
This reverts commit 0cd1f110b5, reversing
changes made to d75d202d33.

Conflicts:
	package.json
2015-05-21 16:25:23 +02:00
Nathan Sobo
2beb6c0fe0 Pass TokenIterator reference instead of using global singleton
Adds an extra reference to each tokenized line but is also more sane.

/cc @maxbrunsfeld
2015-05-20 19:29:38 +02:00
Nathan Sobo
564d75c534 ⬆️ first-mate 2015-05-19 17:22:25 +02:00
Nathan Sobo
0c153a298e Use scope of last token if we iterate off the end 2015-05-16 00:46:31 +02:00
Nathan Sobo
4b5b64f782 Return scopes at very end of token for the last token on a line 2015-05-16 00:06:52 +02:00
Nathan Sobo
ec4c453b87 ⬆️ first-mate 2015-05-14 23:08:02 +02:00
Nathan Sobo
e694b18ae2 Merge branch 'master' into ns-less-memory-for-tokens
Conflicts:
	spec/tokenized-buffer-spec.coffee
	src/tokenized-buffer.coffee
2015-05-14 18:55:16 +02:00
Nathan Sobo
ac5a5d5ba0 Remove unused TokenizedBuffer methods that relied on tokens shim 2015-05-14 17:51:46 +02:00
Max Brunsfeld
31c1ac412b 🎨 remove duplication in TokenizedBuffer::setGrammar 2015-05-13 21:23:20 -07:00
Max Brunsfeld
19d905606b Avoid double computation of screen lines when opening files
Previously, instantiating a TextEditor would always compute compute
screen lines twice: once when the DisplayBuffer was instantiated,
and once when the 'invisibles' property was set on the DisplayBuffer.
2015-05-13 19:59:25 -07:00
Nathan Sobo
64c0ef8bd8 Remove more usages of tokens shim 2015-05-14 01:46:49 +02:00
Nathan Sobo
6b51b5d02a Rename parentScopes to openScopes 2015-05-13 21:17:46 +02:00
Nathan Sobo
a8d01bcec1 Fix bufferRangeForScopeAtPosition with new tags array scheme 2015-05-13 21:17:45 +02:00
Nathan Sobo
06b5d27357 Adapt to first-mate returning purely numeric tag arrays 2015-05-13 21:17:44 +02:00
Nathan Sobo
9583ff04e6 WIP: Start integrating with nested words version of first-mate 2015-05-13 21:17:44 +02:00
Machiste Quintana
2bb2022b5b 👕 2015-04-07 00:05:19 -04:00
Machiste Quintana
5d2392ea67 👕 Fix new coffeelint errors 2015-04-06 23:59:54 -04:00
Kevin Sawicki
0691b837a1 Use new Model superclass in TokenizedBuffer 2015-04-06 11:25:35 -07:00
Kevin Sawicki
7d592c8b78 includeDeprecations -> includeDeprecatedAPIs 2015-04-03 11:29:16 -07:00
Kevin Sawicki
83b679dcc2 ::subscribe -> CompositeDisposable 2015-04-03 11:29:15 -07:00
Kevin Sawicki
f916305538 Conditionally include deprecations in TokenizedBuffer 2015-04-03 11:29:12 -07:00
Kevin Sawicki
d9a5aff919 Add explicit return after for loop 2015-03-19 11:48:40 -07:00
Kevin Sawicki
cd5adb6ab7 Clear invalid rows when short-circuiting for null grammar 2015-03-17 17:41:22 -07:00
octref
ddb4556658 Don't tokenize on NullGrammar
For file format that Atom doesn't recognize as a
programming language, such as log files,
skip Tokenization since no syntax highlighting should be done.
2015-03-17 15:27:02 -04:00
Nathan Sobo
b2d322f531 🎨 Dry up buildTokenizedLineForRow methods on TokenizedBuffer
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-02-12 16:40:18 -07:00
Nathan Sobo
fc3d88aada 🐎 Auto-indent lines prior to inserting in buffer
Needs cleanup

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-02-12 16:21:45 -07:00
Nathan Sobo
f326c818fd Update .foldable on tokenized lines based on indentation 2015-02-06 18:54:13 -07:00
Nathan Sobo
0081fa283e Cache .foldable on tokenized lines based on block comments
Still need to handle indentation
2015-02-06 14:53:07 -07:00
Nathan Sobo
d93950a970 🎨 2015-02-06 13:40:38 -07:00
Nathan Sobo
a4f9413e6b 🎨 2015-02-06 13:31:04 -07:00
Max Brunsfeld
a1b4820c04 Revert "Revert "Merge pull request #4631""
This reverts commit dc2a453986.

Conflicts:
	spec/config-spec.coffee
	src/config.coffee
2014-12-23 09:26:40 -08:00
Max Brunsfeld
dc2a453986 Revert "Merge pull request #4631 from atom/mb-new-config-api"
This reverts commit 5147fb6a8b, reversing
changes made to 9bbbb58084.
2014-12-16 15:27:39 -08:00
Max Brunsfeld
2cea51b50e Take 'scope' option in Config::onDidChange
Deprecate passing the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Nathan Sobo
c58606907a Make scope a trailing option to Config::get 2014-12-16 14:00:56 -08:00
Nathan Sobo
d53d01d95b Replace atom.syntax with atom.grammars 2014-11-20 11:42:49 -07:00
Kevin Sawicki
19b0f760a1 Only re-tokenize lines when tab length changes
Closes #3929
2014-10-30 16:20:05 -07:00
Nathan Sobo
4d796f614c Update Tokenized/DisplayBuffer prior to TextBuffer::onDidChange handlers
Fixes #3789
2014-10-27 13:56:23 -06:00
Ben Ogle
16ad957609 scopeDescriptor -> scopes
Now that we have a real ScopeDescriptor object, 
these should change back!
2014-10-21 11:38:43 -07:00
Ben Ogle
137eeab4cf Return scopes arrays from deprecated methods
backward compatibility
2014-10-21 11:19:58 -07:00
Ben Ogle
14c8e9cedc Fix specs 2014-10-20 18:40:32 -07:00