Commit Graph

3482 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
2c763a4d48 💄 2012-10-01 15:44:56 -07:00
Kevin Sawicki
be8120e8c6 Add initial support for line highlighting 2012-10-01 15:44:56 -07:00
Nathan Sobo
6d151809c3 Delete these old flexbox tests now that we don't really care about flexbox 2012-10-01 11:50:33 -10:00
Kevin Sawicki
83fc9cd7c5 Monospace extension names 2012-10-01 10:40:59 -07:00
Kevin Sawicki
4deb1f2290 Add initial markdown preview docs 2012-10-01 10:34:59 -07:00
Kevin Sawicki
14ba8f712e Update folder name of wrap-guide doc 2012-10-01 10:30:53 -07:00
Kevin Sawicki
2dea1280e2 Create sub-folder for extension docs 2012-10-01 10:28:20 -07:00
Kevin Sawicki
7763ca3d4c Be definitive 2012-09-30 15:01:27 -07:00
Kevin Sawicki
430f03f8e4 Move old wiki page to notes folder 2012-09-30 15:00:45 -07:00
Kevin Sawicki
39530535b9 Put positive case in if statement 2012-09-30 10:57:04 -07:00
Kevin Sawicki
ddf4b55ee8 Mention configuring width 2012-09-30 10:55:33 -07:00
Kevin Sawicki
4a04fabe9b Add h3 and h4 styles to markdown preview stylesheet 2012-09-30 10:50:14 -07:00
Kevin Sawicki
7ce292af61 Add docs for wrap-guide extension 2012-09-30 10:49:37 -07:00
Kevin Sawicki
c089fc2074 Use ## for intro heading 2012-09-30 10:11:12 -07:00
Kevin Sawicki
99fb8a33db Add titles 2012-09-30 10:09:47 -07:00
Kevin Sawicki
599c2293d6 Add content from wiki to docs/ 2012-09-30 10:07:23 -07:00
Kevin Sawicki
a3427fa4cc Setup docs tab 2012-09-30 09:54:35 -07:00
Kevin Sawicki
7506fe7eae Provide default column to getGuideColumn callback 2012-09-29 11:51:32 -07:00
Kevin Sawicki
6412cde7a8 Support guide column callback function
This allows a config function to be registered
in the atom.coffee file to support different wrap
guide columns depending on the type of file being
viewed.
2012-09-29 11:44:05 -07:00
Nathan Sobo
755f1fc273 Add css text mate bundle 2012-09-28 17:36:36 -06:00
Nathan Sobo
4e49fbec72 TextMate grammars can include other grammars 2012-09-28 17:28:40 -06:00
Nathan Sobo
9b8a73d4ed Add ruby-on-rails text mate bundle 2012-09-28 17:28:25 -06:00
Nathan Sobo
3a8fe2b24e Spans have a class for each dot-separated portion of their token's scope
Previously, we were rendering every prefix of the dot-separated scope as its own class. So the scope meta.delimiter.method.period.coffee would make a token w/ classes:

class="meta, meta-delimiter, meta-delimiter-method, meta-delimiter-method-period…"

Now we just give the token each piece of the scope as a class:

class="meta delimiter method period coffee"

We lose a bit of meaning, in that a scope selector method.period.coffee would match this element in CSS even though it *wouldn't* in TextMate. But we also gain the behavior where longer prefixes are more specific by naturally producing more specific css selectors. So '.meta.delimiter.method' is always more specific than '.meta.delimiter', whereas '.meta-delimiter-method' ties with '.meta-delimiter'. 

If prefix ambiguities become a problem later we may need to revisit this approach, but I think it's good enough for now.
2012-09-28 17:00:31 -06:00
Nathan Sobo
dc4d981e2a Fix selector that prohibits weird characters from making lines extra-tall
Now that selectors can nest, this needed to be more permissive
2012-09-28 16:43:41 -06:00
Nathan Sobo
5ad6c67e07 Round alpha channel in TextMate theme rgba colors to 2-decimal places 2012-09-28 16:43:02 -06:00
Nathan Sobo
4ba5ccb0fa Properly translate hex colors from TextMate themes to rgba (divide alpha by 255) 2012-09-28 14:06:10 -06:00
Nathan Sobo
7c9f50209f HTML escape line text 2012-09-28 13:46:15 -06:00
Nathan Sobo
3ebd7cfef1 Output nested spans so that scope selector specificity translates better to CSS
The tokenizer emits individual tokens with arrays of scopes, rather than a more tree-like structure. It's debatable whether we want to emit scope trees rather than token streams in general, though that might complicate things like line wrapping. For now, we're reconstructing the tree during rendering based on information that's implicit in the tokens.
2012-09-28 13:36:43 -06:00
Corey Johnson & Nathan Sobo
bebfaed69b wip: creating token spans 2012-09-28 13:36:43 -06:00
Corey Johnson & Nathan Sobo
f47b510d7c Add HTML TextMate bundle 2012-09-28 13:36:43 -06:00
Corey Johnson & Nathan Sobo
875852d1de logCursorScope works properly 2012-09-28 13:36:43 -06:00
Kevin Sawicki
f2cc859a4c Always store cursor row as a buffer row
Previously the buffer vs. screen row difference
was causing the highlight to not always be present
2012-09-28 11:52:40 -07:00
Kevin Sawicki
6b8963781b Add cursor class if row is already selected 2012-09-28 11:30:56 -07:00
Kevin Sawicki
02768fa68d Refer to instance cursorRow variable 2012-09-28 10:30:13 -07:00
Kevin Sawicki
c2417bfc46 Initialize firstScreenRow to -1 2012-09-28 09:54:30 -07:00
Kevin Sawicki
02fa815459 Highlight the line number of the current cursor row 2012-09-28 09:52:34 -07:00
Corey Johnson & Nathan Sobo
2722fe7d72 Rename stack to ruleStack 2012-09-28 09:41:04 -07:00
Corey Johnson & Nathan Sobo
3a66aab59d getLineTokens must clone the ruleStack 2012-09-28 09:40:06 -07:00
Corey Johnson & Nathan Sobo
ae4db9d238 💄 2012-09-28 09:36:37 -07:00
Corey Johnson & Nathan Sobo
66ac4503a7 Return empty token array for zero-length matches 2012-09-28 09:31:15 -07:00
Corey Johnson & Nathan Sobo
255e58b4f8 Remove unnecessary Array coercion 2012-09-28 09:06:41 -07:00
Corey Johnson & Nathan Sobo
82cecbf042 Add test for situation where we infinitely looped 2012-09-28 09:05:51 -07:00
Kevin Sawicki
4ccaa6f714 Terminate when tokens end position is undefined
This ensures the position is advanced for zero-length
matches and only terminates when the end position for
the tokens is no longer valid.
2012-09-27 19:07:08 -07:00
Nathan Sobo
d37a0dd916 Cache repeated regexp matches against the same string for another 5-10% boost
This is tricky… basically when the scanner is matching across the same string repeatedly, it can recycle previous results if the following conditions are true:

- The string is the same
- We're matching at a position >= the last position
- The result for the regex is a failure or starts >= the current start position
2012-09-27 15:53:02 -06:00
Nathan Sobo
840790645b Release OnigScanner's regexes in the destructor 2012-09-27 15:53:01 -06:00
Kevin Sawicki
758812bd2b Add hover color that is the same as the selected color 2012-09-27 13:46:31 -07:00
Kevin Sawicki
b8926e7e28 Add spec for markdown preview detachment 2012-09-27 13:21:13 -07:00
Kevin Sawicki
e202904b78 Don't update HTML if view has no parent 2012-09-27 13:21:02 -07:00
Kevin Sawicki
d8011fe853 Add initial markdown preview extension
Uses the GitHub Markdown API to render the current
editor contents for .md and .markdown files.
2012-09-27 13:07:22 -07:00
Kevin Sawicki
71a3842c12 Disable text selection in fuzzy finder list
Mirror the style in the tree view where the
cursor indicates text selection is not possible
2012-09-27 13:07:22 -07:00