Max Brunsfeld
3cb64a97bd
Enable soft wraps and folds in large file mode
2016-12-06 17:34:00 -08:00
Antonio Scandurra
1f210adad1
Delete unused conditional in tokenizeNextChunk and invalidateRow
...
Previously, for null grammar and large file mode, we were short
circuiting the tokenization of the next chunk or the invalidation of a
row. However, that is unnecessary because there is no additional chunk
to process with null grammar or in large file mode.
2016-10-12 18:56:33 +02:00
Antonio Scandurra
d393cba75d
Simplify on-demand placeholder line creation and add test coverage
2016-10-12 13:04:03 +02:00
Antonio Scandurra
633e68f4d5
Remove null guard in scopeDescriptorForPosition
2016-10-12 12:18:58 +02:00
Antonio Scandurra
ea80483cbe
Delete TokenizedBuffer.prototype.buildPlaceholderTokenizedLinesForRows
2016-10-12 12:16:17 +02:00
Antonio Scandurra
d3882c165f
🎨
2016-10-12 12:09:28 +02:00
Antonio Scandurra
00f4c7b282
Use TokenizedBuffer.prototype.tokenizedLineForRow conservatively
...
Since this method will now construct a placeholder line, we want to use
it only where necessary to keep memory footprint to a minimum.
2016-10-12 09:04:41 +02:00
Antonio Scandurra
66510ae545
Handle null grammars consistently, building placeholder lines on-demand
...
Previously we were treating the local `NullGrammar` differently from
`atom.grammars.nullGrammar`. These two grammars are conceptually the
same, as the former was created to support editors creation without a
grammar registry.
To keep backwards-compatibility, we also build placeholder lines
on-demand when calling `TokenizedBuffer.prototype.tokenizedLineForRow`.
This ensure that packages relying on the internals of `TokenizedBuffer`
to retrieve syntactic boundaries won't break when the null grammar is
used or large file mode is on.
2016-10-12 09:04:41 +02:00
Max Brunsfeld
d20372a35f
Start on removing placeholder lines in TokenizedBuffer
2016-10-12 09:04:41 +02:00
Antonio Scandurra
3d2e18747f
Prefer using new TextEditor to Workspace.prototype.buildTextEditor
2016-10-10 09:28:36 +02:00
Indrek Ardel
55f3311c01
Remove unused variables
2016-09-26 20:52:13 +03:00
Antonio Scandurra
42079b309d
Always return an empty array in TokenizedBuffer.getInvalidatedRanges
...
..because TokenizedBuffer never synchronously invalidates beyond the
extent of the spatial change.
Signed-off-by: Nathan Sobo <nathan@github.com >
2016-09-21 16:56:19 +02:00
Antonio Scandurra
83daa09abc
Remove buffer change event order assertion
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2016-08-29 17:58:38 +02:00
Max Brunsfeld
38849474d0
Merge branch 'master' into ns-mb-detangle-editor
2016-08-10 13:23:32 -07:00
Antonio Scandurra
23f421154e
Delete TokenizedBuffer.prototype.onDidChange
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2016-08-10 17:52:49 +02:00
Antonio Scandurra
6ae263aed4
Register text decoration layer when initializing TokenizedBuffer
2016-08-10 11:47:07 +02:00
Max Brunsfeld
5d83874725
Merge branch 'master' into ns-mb-detangle-editor
2016-08-08 15:39:24 -07:00
Max Brunsfeld
ee2e18737e
Fix maintenance of grammars for copied editors
2016-08-08 11:17:30 -07:00
Antonio Scandurra
4b6f09cd10
Assert that all buffer events are processed sequentially
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2016-08-08 18:41:20 +02:00
Antonio Scandurra
94b4709db1
Store last buffer change event id on TokenizedBuffer
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2016-08-08 18:09:28 +02:00
Max Brunsfeld
16c80f6eaf
WIP - add local null grammar
2016-07-28 14:47:26 -07:00
Max Brunsfeld
3d796df401
Stop using GrammarRegistry in TextEditor
2016-07-27 14:09:17 -07:00
Max Brunsfeld
e6c83521c9
Move grammar serialization logic to TextEditorRegistry
2016-07-27 13:10:23 -07:00
Max Brunsfeld
d203610986
Set grammar manually in tokenized buffer specs
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2016-07-26 15:08:59 -07:00
Max Brunsfeld
20b54505f3
Move logic for assigning grammars to editors into TextEditorRegistry
2016-07-26 10:50:57 -07:00
Max Brunsfeld
c0cbb59666
Don't use config in TokenizedBuffer
2016-07-12 14:31:05 -07:00
Max Brunsfeld
54a9f3004d
TokenizedBuffer: emit 'did-tokenize' event even when chunking is stubbed out
2016-07-11 12:42:47 -07:00
Nathan Sobo
e9650f611f
Use grammar instead of registry to resolve scope names
2016-07-06 13:12:19 -06:00
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