Commit Graph

1276 Commits

Author SHA1 Message Date
Nathan Sobo
9c7c2ab800 Store TM bundle start/end comment strings in scoped properties
Previously, we had a custom method on the `TextMateBundle` class for
retrieving these variables from the bundle. Now we're using Atom's
`syntax.getProperty` mechanism. The idea is to map TextMate concepts
to their Atom equivalent, rather than building everything directly
around TextMate.
2012-12-28 13:27:54 -06:00
Nathan Sobo
f4d53a017c Merge branch 'master' into config 2012-12-28 11:32:24 -06:00
Kevin Sawicki
575e34d5e4 Forward window focus when active element is body
This problem was when the focus element is detached
when navigating away from the window and when
the window is then given focus again nothing has
focus.

The solution is to use RootView's focus handler
on the window to bring focus to the editor or
other view when the document's active element
is the body meaning nothing inside the RootView
currently has focus.
2012-12-27 21:56:43 -08:00
Nathan Sobo
16c248dbe6 Deal w/ the fact that TextMate settings aren't *always* scoped 2012-12-27 20:13:02 -06:00
Corey Johnson
4a6d336763 Theme.load can take multiple theme names 2012-12-27 16:13:53 -08:00
Corey Johnson
4244e673af Load themes from Config.load 2012-12-27 15:52:09 -08:00
Corey Johnson
71267fd7fe Make required path lowercase 2012-12-27 15:51:43 -08:00
Corey Johnson
82abbaa71c Break AtomTheme out into its own file. 2012-12-27 15:25:16 -08:00
Corey Johnson
0d946078c9 Atom Themes can be loaded 2012-12-27 14:31:13 -08:00
Corey Johnson
d509507b0c TextMateTheme extend Theme 2012-12-27 12:12:58 -08:00
Kevin Sawicki
219aaca0f5 Show diff stat in status bar
Include the number of lines added and removed for
new and modified files
2012-12-27 10:41:29 -08:00
Corey Johnson
d77fc88ff4 Merge remote-tracking branch 'origin/master' into config 2012-12-27 10:38:24 -08:00
Kevin Sawicki
e941459ca7 Register click past last line handler on underlayer 2012-12-27 08:26:32 -08:00
Jon Rohan
20eba7438b making the underlayer min-height instead of height, to see the wrap guide go full screen 2012-12-26 22:16:18 -08:00
Corey Johnson
5eb16d8304 Add window.removeStylesheet 2012-12-26 17:41:49 -08:00
Corey Johnson
b08422bc6b TextMateTheme@load will load absolute paths 2012-12-26 17:41:49 -08:00
Corey Johnson
e5e5c497e1 Load themes from ~/.atom/themes 2012-12-26 17:41:48 -08:00
Jon Rohan
b7e6bfcbdc Merge pull request #113 from github/tree-massage
Cleaning up the tree view style
2012-12-26 17:13:46 -08:00
Kevin Sawicki
110ccc9b7a Match firstLineRegex against entire file 2012-12-26 15:22:41 -08:00
Kevin Sawicki
7cce042f03 Change case of prefix and suffix to matched word
Previously an inserted automcomplete match would not
update the case of the prefix or suffix of the match
and instead only insert the text from the matched word
between the prefix and suffix.

Now the entire matched word is inserted as-is replacing
the existing prefix and suffix.
2012-12-26 15:09:07 -08:00
Jon Rohan
10866223d3 Merge branch 'master' into tree-massage 2012-12-26 13:13:08 -08:00
Kevin Sawicki
a9b9c09a86 Only show wrap guide when enough space
Previously the wrap guide would cause the
editor to scroll if the editor was narrower
than the wrap guide column without taking into
account whether any lines actually reach the guide.

Now the wrap guide only displays when either the wrap
guide column is less than the minimum width of the
editor layer or if the wrap guide column is less than
the entire width of the editor.
2012-12-26 12:48:49 -08:00
Kevin Sawicki
f592242737 Terminate when no more tokens and at end of line
This corrects a regression when pattern matching
to the newline was added.

If the newline is never matched the loop still needs to
terminated so now when the position is before the newline
and the last match had no tokens the loop is broken out of.
2012-12-26 11:44:15 -08:00
Jon Rohan
fe72776a7b Merge branch 'master' into tree-massage 2012-12-26 11:18:52 -08:00
Kevin Sawicki
518a71910d Support clicking past last editor line
Clicking below the last line of an editor
now either moves the cursor to the end of
the file or selects to the end of the file
if shift is pressed.
2012-12-26 11:08:28 -08:00
Jon Rohan
fbbe59714e Having the trailing / in the directory treeview is cruft
I wanted to remove the trailing / in the tree view. However, I have no
idea if this breaks other stuff?
@nathansobo @probablycorey
2012-12-24 17:15:50 -08:00
Nathan Sobo
a1d28a9f74 WIP: Start on Package class w/ TextMate- & Atom-specific subclasses
The `load` method on the superclass will provide a general template for
loading the package's resource. Each subclass will be responsible for
loading resources in a manner appropriate for the package type. There's
some initial progress on loading TextMate settings as scoped properties,
translating the TextMate scope selectors to CSS-style atom selectors.
2012-12-23 15:36:06 -06:00
Nathan Sobo
f76bab512f Most recently added scoped properties win in case of a specificity tie
This makes the scoped property system mimic the behavior of CSS. When 
there is a tie, the scoped properties loaded later in the cascade win.
I also optimize the scanning of all the properties, checking only those
sets of properties that have a value for the desired key path, to reduce
the need to match a ton of scope selectors.
2012-12-23 13:19:20 -07:00
Nathan Sobo
bbd2e384c5 Merge branch 'master' into config 2012-12-23 12:52:02 -07:00
Nathan Sobo
886995364f Start on syntax global. Use it to replace scoped config settings.
We'll store all syntax-related global state in the `syntax` global. For
now, this means that all scoped properties will be stored here, as well
as all grammars.
2012-12-23 12:50:58 -07:00
Kevin Sawicki
ff3b04e01e Support clicking line numbers in gutter
Clicking moves the cursor to the start of the
row and shift-clicking selects to the start of
the row
2012-12-22 23:40:23 -08:00
Kevin Sawicki
b59bd7a099 Check selection being empty before comparing highlighted rows 2012-12-22 22:16:38 -08:00
Kevin Sawicki
905002cd58 Highlight foreground of selected line numbers
Previously no gutter highlight was displayed unless
the selection was empty.

Now there is a separate CSS class for no selection
that changes the background color independently
from the foreground color.
2012-12-22 22:06:46 -08:00
Nathan Sobo
6e5f9b9a27 Kill unused require 2012-12-21 18:20:28 -07:00
Nathan Sobo
9b6c310239 Implement scoped config settings
You can pass a scope stack when calling `config.get`, which will prefer
settings under the most specific matching scope selector for the given
scope stack.
2012-12-21 18:20:20 -07:00
Kevin Sawicki
559b9132f9 Parse until position equals line length including trailing newline 2012-12-21 13:22:13 -08:00
Kevin Sawicki
0938811612 Clear anchor positions in stack after line is tokenized 2012-12-21 13:22:13 -08:00
Kevin Sawicki
8aba95191d Append anchor characters when placeholder is not added 2012-12-21 13:22:13 -08:00
Kevin Sawicki
4c1ecf61df Anchor second capture index 2012-12-21 13:22:13 -08:00
Kevin Sawicki
9f6d1f987f Add initial support for replacing anchors 2012-12-21 13:22:08 -08:00
Nathan Sobo
25aadda742 Merge branch 'master' into config 2012-12-20 22:17:32 -07:00
Nathan Sobo
356702c2f3 Clone defaults in config constructor so they aren't mutated.
This fixes failures caused pollution of state between specs
2012-12-20 22:13:12 -07:00
Nathan Sobo
0ca1440026 Oops. Don't overwrite user config w/ defaults before its loaded 2012-12-20 21:40:08 -07:00
Nathan Sobo
56f19cd01a Kill console.log 2012-12-20 21:39:52 -07:00
Nathan Sobo
c7605b8aa6 Move loadPackages to atom global. Handle '-tmbundle' in regex.
This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
2012-12-20 21:34:07 -07:00
Nathan Sobo
dd8597cc9c Set config defaults in its constructor 2012-12-20 21:30:37 -07:00
Corey Johnson
0515274e2f TextMate bundles end in .tmbundle or _tmbundle 2012-12-20 17:01:12 -08:00
Corey Johnson
5ea9a4d365 Load TextMate Bundles from packages directories 2012-12-20 16:25:08 -08:00
Kevin Sawicki
628d22de0a Use tab invisible that is available in Inconsolata
Previously a non-Inconsolata character
was being used which caused alignment issues
with selections and the cursor

Also switch values in editor.coffee to use codes
so they can be viewed in any font.
2012-12-20 14:50:51 -08:00
Corey Johnson
972d3e5536 💄 2012-12-20 10:34:36 -08:00