Commit Graph

170 Commits

Author SHA1 Message Date
Antonio Scandurra
ce4b2fa810 Merge branch 'master' into ns-switch-to-display-layers
# Conflicts:
#	src/display-buffer.coffee
#	src/text-editor.coffee
#	src/tokenized-buffer.coffee
2016-04-27 18:16:03 +02:00
Antonio Scandurra
1dc518050a Missing break statement when encountering an unmatched scope end tag 2016-04-27 10:56:50 +02:00
joshaber
5d7c2fc8ba Just observe the grammar. 2016-04-26 10:32:41 -04:00
joshaber
58d8e6bca8 Typo 2016-04-25 16:11:38 -04:00
joshaber
eaf6036a2c Wait a tick before sending the event. 2016-04-25 15:34:37 -04:00
joshaber
2266f1e3b6 Revert "Just use the already existing change grammar event."
This reverts commit 9014634b3a.
2016-04-25 15:15:31 -04:00
joshaber
9014634b3a Just use the already existing change grammar event. 2016-04-25 15:09:03 -04:00
joshaber
e8a4f38c69 Don't need to pass the package manager through anymore. 2016-04-25 14:50:14 -04:00
joshaber
6b309be6da Propagate a did-use-grammar event out of the tokenized buffer. 2016-04-25 14:49:43 -04:00
Antonio Scandurra
27aad42644 Handle tab length retokenization in DisplayLayer
We still want to keep the tab length in TokenizedBuffer, because we need
it to understand if a certain buffer row is foldable or not (due to the
indent level)
2016-03-25 10:33:12 +01:00
Antonio Scandurra
756db7588b Return an invalidated range only when TokenizedBuffer has one 2016-03-22 14:59:26 +01:00
Nathan Sobo
462157039b Drop indentLevel and soft wrap support from TokenizedLine 2016-03-18 18:09:23 -06:00
Antonio Scandurra
d1306ae944 Remove invisibles handling from TokenizedBuffer 2016-03-18 14:09:52 +01:00
Antonio Scandurra
dfed7c4537 Merge branch 'master' into ns-use-display-layers
# Conflicts:
#	package.json
#	src/display-buffer.coffee
#	src/text-editor.coffee
#	src/tokenized-buffer.coffee
2016-03-10 13:53:14 +01:00
Antonio Scandurra
bea324eae9 🔥 Use just isFoldableAtBufferRow 2016-02-17 15:05:31 +01:00
Antonio Scandurra
012fa354c4 Add TokenizedBuffer.prototype.foldableRowsForRowRange 2016-02-17 10:34:21 +01:00
Antonio Scandurra
0afa9bb21c Don't update foldable status, ever 2016-02-17 10:34:21 +01:00
Nathan Sobo
a90a2e65b5 Implement TokenizedBuffer.prototype.onDidInvalidateRange
This causes DisplayLayer to emit change events when syntax is updated
asynchronously.
2016-01-14 14:45:52 -07:00
Nathan Sobo
0d55a0bd76 Make TokenizedBuffer conform to text decoration layer interface 2016-01-13 18:22:04 -07:00
Antonio Scandurra
19ff676c7b Serialize grammar for untitled buffers 2015-12-16 10:35:23 +01:00
Antonio Scandurra
a8a9581ef4 🎨 Use only id 2015-12-07 19:57:30 +01:00
Antonio Scandurra
f7a4ef4a84 Deserialize also untitled buffers 2015-12-07 14:47:23 +01:00
Antonio Scandurra
534f038631 Don't use atom globals in TokenIterator 2015-10-07 15:25:02 -05:00
Antonio Scandurra
df2d73a8df Don't use atom globals in TokenizedBuffer 2015-10-07 15:25:02 -05:00
Nathan Sobo
122bf72c75 Don’t use atom.packages global in TokenizedBuffer 2015-10-07 15:25:00 -05:00
Nathan Sobo
b2359f44a6 Don’t use atom.grammars global in TokenizedBuffer 2015-10-07 15:25:00 -05:00
Nathan Sobo
4f65452902 Don’t use atom.config global in TokenizedBuffer 2015-10-07 15:24:59 -05:00
Nathan Sobo
dc0709ef9e Don’t use atom.assert global in DisplayBuffer 2015-10-07 15:24:59 -05:00
Nathan Sobo
4a1d1fdffb Don’t use Serializable mixin in TokenizedBuffer 2015-09-22 10:37:15 -06:00
Nathan Sobo
a8c77ae91f 🔥 Remove grim require from TokenizedBuffer 2015-09-22 10:37:09 -06:00
Max Brunsfeld
30d8216bf6 Merge branch 'master' into mb-custom-extension-grammar-map
Conflicts:
	package.json
2015-08-12 17:31:15 -07:00
Nathan Sobo
eb4944b07d Make bufferRangeForScopeAtPosition work with last column of scope 2015-08-10 14:21:23 -06:00
Max Brunsfeld
989bb86199 Start work on custom scope -> filetypes configuration 2015-07-30 17:39:55 -07:00
Nathan Sobo
f254c46a62 Keep popping scopes until we find a matching start scope tag 2015-07-17 11:10:09 -07:00
Nathan Sobo
c7d99140b9 Merge pull request #7638 from atom-community/jf-dispatch-grammar-used
Add activationHooks + Trigger `{grammar-package-name}:grammar-used` Hook When A text-editor-element's Grammar Is Set
2015-07-09 15:42:31 -05:00
Nathan Sobo
4567601ae9 Maintain change counts for debugging purposes
When we have an unexpected display-buffer or tokenized-buffer state,
we can include the change counts to make sure that every change to the
buffer has been processed by display-buffer and tokenized-buffer. If
they haven’t, there’s something wrong with our event ordering. If they
have, there’s a logic error somewhere else.
2015-07-09 02:18:24 -05:00
Nathan Sobo
028acbcae4 Don’t call method to read stack
If the line is undefined, we want the stack to be null.
2015-07-09 01:51:36 -05:00
Joe Fitzgerald
b3b046aa66 Add activationHooks To package.json
- Trigger the `{grammar-package-name}:grammar-used` hook when grammar is set for tokenized-buffer
2015-07-09 02:33:17 -04:00
Nathan Sobo
587e898867 Remove assertion since we call this with out of range rows legitimately 2015-07-09 00:28:46 -05:00
Nathan Sobo
a352a2ca61 Try to avoid exceptions due to undefined lines in TokenizedBuffer 2015-07-09 00:13:06 -05:00
Nathan Sobo
b953a11fa5 Clip positions in TokenizedBuffer::scopeDescriptorForPosition 2015-07-08 17:06:05 -05:00
Nathan Sobo
54549f916a Change assertion API to pass error to callback
Don’t assume anything about metadata. Just give assertion callers access
to the error object.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-07-07 19:29:23 -05:00
Nathan Sobo
e529d1e345 Request contents of buffer when first-mate tags are in a corrupt state 2015-07-01 16:46:09 -05:00
Nathan Sobo
8ea36a6ac5 In invalid scope exception: include grammar metadata, ask for details 2015-07-01 13:59:47 -05:00
Nathan Sobo
8b088926bb Merge pull request #7602 from atom/ns-mixed-indent
Restore support for mixed tabs and spaces in line indentation
2015-06-30 15:54:47 -05:00
Nathan Sobo
82e25872b2 Handle indentation with mixed tabs and spaces 2015-06-30 15:31:11 -05:00
Nathan Sobo
5d957b677b Revert "Merge pull request #7373 from atom/revert-7350-ns-assertions"
This reverts commit 1a3441a503, reversing
changes made to 1aab5e74d9.
2015-06-30 15:30:58 -05:00
Nathan Sobo
b6d099ac78 Consider tabs or spaces mutually exclusively as indentation
Previously, we allowed a mix of tabs and spaces to be counted toward the
indentation of a line. This caused problems when auto-indenting lines in
a hard-tabbed file that contained “alignment spaces”, such as occurs in
aligned comment blocks. For this case, it makes more sense to assume
that the line is indented via tabs only, and consider the subsequent
alignment space as part of the line’s content. Since it’s hard to
imagine actual source code in which a mixed treatment of tabs and spaces
is desirable, I’m going with this over any more complex approach.
2015-06-29 17:05:28 -05:00
Nathan Sobo
b7a8ddd153 Revert "Add assertion mechanism" 2015-06-22 14:27:05 -05:00
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