Antonio Scandurra
7d97241f35
🎨
2015-11-06 17:41:00 +01:00
Antonio Scandurra
dd10216943
🐎 Make LanguageMode::unfoldAll faster
2015-11-06 13:16:09 +01:00
Max Brunsfeld
d8b08d3240
Don't use atom.config global in LanguageMode
2015-10-07 15:25:00 -05:00
Sander van Harmelen
46625b9a22
Fix indentation for languages without indent pattern
2015-07-23 19:03:28 +02:00
Sander van Harmelen
0e4468c55f
Tweak enabling a few more use cases...
2015-07-20 22:36:58 +02:00
Sander van Harmelen
e7de136a27
Small tweaks after review
2015-07-13 00:58:03 +02:00
Sander van Harmelen
195b84a34a
Fix indentation when pasting lines
...
The fix to ignore invisibles () introduces a new bug when pasting lines
from the clipboard (see screencast below).
As the commit takes the content of `@buffer.lineFromRow(bufferRow)` to
test against the `decreaseIndentRegex`, it will actually test the
content of the row the cursor is on instead of the content that is
being pasted. And this (of course) could cause unexpected indentations.
2015-07-12 23:57:13 +02:00
Sander van Harmelen
eaf814e5be
Improve auto indenting by removing a hard coded restriction and adding a 3rd regexp
...
Currently there are only two regexps that can influence the indents.
Those are `increaseIndentPattern` (which tells Atom the indent of next
line should be increased) and `decreaseIndentPattern` (which tells Atom
the indent of the current line should be decreased).
But I found that a couple of languages would need a 3rd regexp in order
to support their use cases. This 3rd regexp should be a mixture of the
existing two so it tells Atom that the indent of the next line should
decrease.
I’ll add a screencast to show a use case for this 3rd regexp which I
would like to call `decreaseNextIndentPattern`.
2015-07-08 20:30:21 +02:00
Max Brunsfeld
64dfda572d
Use raw buffer text (w/o invisibles) when testing decreaseIndentRegex
2015-06-17 12:07:42 -07:00
Max Brunsfeld
715238c3cd
Add by clauses to for loops to avoid complex loop increments
2015-06-12 16:38:07 -07: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
64f576624e
Avoid tokens shim in suggestedIndent code
2015-05-14 17:39:23 +02:00
Ben Ogle
f6c1f95b65
Rename method for clarity
2015-04-13 16:32:26 -07:00
Ben Ogle
8f2fbbfd9d
Rename method to be more consistent
2015-04-13 16:29:10 -07:00
Ben Ogle
2872000d13
Fix paragraph computation in blocks of single line comments.
...
Closes #6050
Closes #5963
2015-04-13 16:26:24 -07:00
Sean Lee
74caf89dd1
🐛 fix rowRangeForParagraphAtBufferRow using \S
2015-04-13 15:46:27 -07:00
Kevin Sawicki
4160a8c239
Merge pull request #6230 from mnquintana/coffeelint-plus
...
Lint for more styleguide errors
2015-04-08 12:07:23 -07:00
Kevin Sawicki
7b952e3f33
Remove unused emissary mixins
2015-04-07 14:50:36 -07:00
Machiste Quintana
5d2392ea67
👕 Fix new coffeelint errors
2015-04-06 23:59:54 -04:00
Kevin Sawicki
590a4b0fd5
Add explicit return after for loop
2015-03-19 11:48:40 -07:00
Nathan Sobo
18826f414c
🎨 Dry up suggested indent methods in LanguageMode
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-12 16:33:42 -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
c8c13b8b40
Use cached .foldable values on TokenizedBuffer instead of recomputing
2015-02-06 18:54:34 -07:00
Cheng Zhao
93181d8a54
Array::find is undefined in Chrome 40
2015-01-28 14:06:14 -08:00
Max Brunsfeld
eabb498af7
Fix LanguageMode::foldAllAtIndentLevel
2014-12-30 18:10:28 -08:00
Max Brunsfeld
825c4f6098
Remove incorrect docs for ::toggleLineCommentsForBufferRows
2014-12-30 12:36:46 -08:00
Max Brunsfeld
c7771ffde9
Add Config::getAll, deprecate ::settingsForScopeDescriptor
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2014-12-29 11:01:46 -08: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
Nathan Sobo
c58606907a
Make scope a trailing option to Config::get
2014-12-16 14:00:56 -08:00
Max Brunsfeld
7c43ea7a0f
Restore correct indent behavior when inserting newlines
...
When explicitly auto-indenting and when pasting, indentation is based
on the previous non-blank line. When simply inserting newlines,
the previous line is used, even if it is blank.
Signed-off-by: Nathan Sobo <nathan@github.com >
2014-11-18 17:27:43 -08:00
Max Brunsfeld
83040d13c7
Base suggested indent level on previous non-blank row
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2014-11-17 08:53:29 -08:00
Ben Ogle
c0091b4601
scopes -> scopeDescriptor
...
!!!
2014-10-13 16:30:41 -07:00
Ben Ogle
56c6c3516a
scopesForBufferPosition -> scopeDescriptorForBufferPosition
2014-10-13 16:16:44 -07:00
Ben Ogle
a711e908d5
💄
2014-10-03 10:46:57 -07:00
Ben Ogle
3732bdf1e9
Ugh, add settingsForScopeDescriptor back
...
It’s used by language mode and autocomplete for different things
2014-10-03 10:46:57 -07:00
Ben Ogle
b1f8c6a6e8
Remove special method for language mode
2014-10-03 10:46:57 -07:00
Ben Ogle
e2ac19c17f
Use config rather than syntax for scoped properties
2014-10-03 10:46:13 -07:00
Ben Ogle
683d0d1b16
Editor -> TextEditor
2014-09-25 15:14:29 -07:00
Kevin Sawicki
3fb22f123a
Don't throw errors when folding comments
...
Previously trying to fold single line comments at the start/end
of files would throw errors since the +1 and -1 used in the
index ranges would cause the loop to advance past the last row
or before the first row.
2014-09-18 11:06:25 -07:00
Ben Ogle
5e21d1ca5b
Deprecate Editor::lineLengthForBufferRow
2014-09-03 14:42:46 -07:00
Ben Ogle
c0c941b8db
lineForBufferRow -> lineTextForBufferRow
2014-09-03 14:42:46 -07:00
Ben Ogle
99f899dc4a
lineForScreenRow -> tokenizedLineForRow
...
The method was severely mislabeled
2014-09-03 14:42:45 -07:00
Kevin Sawicki
8099c46c8e
Use OnigRegExp::testSync
2014-07-22 14:38:08 -07:00
Kevin Sawicki
bbfd9b8178
Use testSync instead of test
2014-07-22 14:08:40 -07:00
Kevin Sawicki
6d34de68ac
Add Sync suffix to oniguruma methods
2014-07-22 13:31:52 -07:00
Lee Dohm
3cf4b7b3e4
Use imperative style and standard JS regex
...
Based on pull request feedback
2014-06-10 14:54:01 -07:00
Lee Dohm
a2c9c21cfb
Change line commenting to ignore blanks if any non-blanks
...
Fixes #2526
This slightly alters the heuristic for deciding whether to uncomment
or to comment blocks of code. Previously, it would key off the first
line of code and only if that was commented would it check the other
lines. Now it checks all lines of code and uncomments the block if all
non-blank lines are commented out.
2014-06-09 21:31:46 -07:00