Commit Graph

60 Commits

Author SHA1 Message Date
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
Kevin Sawicki
9cf642e910 Preserve indentation when commenting
Previously this happened only when the language did not have a
comment end pattern.
2014-04-30 09:50:11 -07:00
Corey Johnson
1583271e2f Use setTextInRange instead of change 2014-04-18 15:50:30 -07:00
Kevin Sawicki
1aa64a9d80 Use cursor indent level if commenting single line
Previously commenting a line of all whitespace would insert
the comment at column 0 on the line since blank lines are
ignored when calculating the minimum indent level.
2014-04-03 18:26:50 -07:00
Kevin Sawicki
61f01f4713 📝 Add through 2014-03-19 10:05:34 -07:00
Kevin Sawicki
8e62d772b3 Ignore leading whitespace when auto-indenting a newline
Refs atom/language-less#1
2014-03-19 10:05:34 -07:00
Kevin Sawicki
8aa2c40bbf Don't capture whitespace group in comment patterns
This was causing corruption when uncommenting XML since the fact that
it was being captured was throwing off the index used into the match.

Closes atom/language-xml#3
2014-03-18 18:19:59 -07:00
Nathan Sobo
f17c490768 Make Editor::unfoldBufferRow destroy all folds containing the buffer row
Also, remove ::destroyAllFoldsContainingBufferRow as it is now redundant
2014-02-27 16:16:01 -08:00
Kevin Sawicki
2248bbf8fb Remove unused ivars 2014-02-10 14:43:28 -08:00
Kevin Sawicki
227454e27e Remove ### style visibility comments 2014-02-06 10:40:45 -08:00
Kevin Sawicki
932a792289 Remove Private: prefix 2014-02-06 10:02:53 -08:00
Nathan Sobo
525b5c9978 Don't make commented lines foldable based on the next line's indentation
Only the first line of a set of commented lines should be foldable, even
if some of the lines in the block are indented.
2014-01-20 14:29:08 -07:00
Nathan Sobo
da56c1def5 💄 comments 2014-01-20 14:09:25 -07:00
Nathan Sobo
3eb7c9d767 Add LanguageMode::toggleLineCommentForBufferRow for toggling single rows 2014-01-20 11:14:27 -07:00
Nathan Sobo
ed93695d64 Add a foldable indicator for multi-line comments 2014-01-18 12:08:37 -07:00
Nathan Sobo
fa6bce3085 Rename LanguageModel::isBufferRowFoldable to ::isFoldableAtBufferRow
It blends in better with the methods on Editor.
2014-01-17 15:19:07 -07:00
Nathan Sobo
8e75831318 Rename LanguageMode::doesBufferRowStartFold to ::isBufferRowFoldable 2014-01-17 14:30:40 -07:00
Nathan Sobo
c6770aa83e Merge remote-tracking branch 'origin/master' into ns-remove-telepath-from-core
Conflicts:
	package.json
	src/pane.coffee
2014-01-03 17:46:45 -07:00
Nathan Sobo
914a87290b Remove unnecessary telepath requires 2014-01-03 16:36:26 -07:00
Kevin Sawicki
ccc6eed3da Remove unused method 2013-12-31 15:15:39 -08:00
probablycorey
31a9bb83cf Replace editSession variables with editor 2013-11-19 15:22:47 -08:00
probablycorey
bf05ddb958 🔫
I screwed up a rebase, this nasty commit is the result.
2013-11-19 15:15:12 -08:00
probablycorey
955d379e0e Rename EditSession to TextEditor 2013-11-19 14:56:09 -08:00