Commit Graph

2928 Commits

Author SHA1 Message Date
Jon Rohan
8a83c45a50 fixing the treeView tests 2012-12-26 15:17:33 -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
Jon Rohan
afef7c5a7a Merge pull request #114 from github/foot-loose
Everybody everybody cut footloose
2012-12-26 13:12:10 -08:00
Jon Rohan
ca39b9dccb re-organizing the cursor position text 2012-12-26 13:06:27 -08:00
Jon Rohan
b737977c61 fixin spec tests 2012-12-26 12:52:01 -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
Jon Rohan
4ce71e5bc2 Merge branch 'master' into foot-loose 2012-12-26 12:47:59 -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
Jon Rohan
3436d05116 Merge pull request #111 from github/table-tabs
Changing the tab display style to a table layout.
2012-12-26 11:13:54 -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
14ca750932 Changing around the status bar html 2012-12-25 11:18:13 -08:00
Jon Rohan
3863e73df8 Add a .highlight span in each li 2012-12-24 17:16:17 -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
Jon Rohan
29c3c9f0a9 having div here is invalid li can only be in a list 2012-12-24 17:03:12 -08:00
Jon Rohan
9bd6883eac really using the system font, determined via css2.1 2012-12-24 13:19:20 -08:00
Jon Rohan
174925be3d changing the max tab size 2012-12-24 13:14:41 -08:00
Jon Rohan
0dab956588 system wide font 2012-12-24 13:11:51 -08:00
Jon Rohan
d697986e3e updating the tab font-family 2012-12-24 13:05:27 -08:00
Jon Rohan
7f32c7f3bb oops, doesn't belong here 2012-12-24 12:49:07 -08:00
Jon Rohan
f62563e232 fixing the min-width on the tabs 2012-12-24 12:08:21 -08:00
Jon Rohan
4c243c5f7b updating the style to have reverse rounded corners at bottom 2012-12-24 11:54:08 -08:00
Jon Rohan
01cde54b76 Changing the tab display style to a table layout. 2012-12-24 11:22:56 -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
Nathan Sobo
7dcb12ada2 RootView talks about packages and packageModules, not extensions
Now you call `rootView.activatePackage`, etc
2012-12-19 19:24:44 -07:00
Nathan Sobo
8d63805072 Pull out ConfigObserver & Subscriber mixins; Add unobserveConfig 2012-12-19 17:32:04 -07:00
Kevin Sawicki
da841b0ac6 Use consistent quotes in strip-trailing-whitespace 2012-12-19 08:48:21 -08:00
Kevin Sawicki
6d31946d31 Merge single-trailing-newline into strip-trailing-whitepsace
single-trailing-newline functionality is now available as a
config option on the strip-trailing-whitespace package
2012-12-19 08:45:44 -08:00
Kevin Sawicki
b937e0dfbd Remove unused require 2012-12-18 22:19:22 -08:00
Kevin Sawicki
9ab75fd09b Remove duplicate package 2012-12-18 22:16:17 -08:00
Kevin Sawicki
22d4c679f5 Move status-bar to packages folder 2012-12-18 22:09:02 -08:00
Kevin Sawicki
e14d61f799 Move single-trailing-newline extension to packages folder 2012-12-18 21:53:31 -08:00
Kevin Sawicki
1e5515555e Use command() instead of on() for document events
Allows commands such as 'open-user-configuration' to
appear and be invoked from the event palette

This was previously committed as 07a5672 but was merged
over when the config branch was merged into master.
2012-12-18 21:47:40 -08:00
Nathan Sobo
00b86ffac4 Merge branch 'master' into config
Conflicts:
	src/app/keymap.coffee
	src/extensions/outline-view/src/keymap.coffee
	src/extensions/outline-view/src/tag-reader.coffee
	src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee
	src/packages/fuzzy-finder/src/fuzzy-finder.coffee
2012-12-18 20:36:22 -07:00
Nathan Sobo
acc0503684 Merge remote-tracking branch 'origin/master' into config
Conflicts:
	src/app/keymap.coffee
	src/extensions/outline-view/src/keymap.coffee
	src/extensions/outline-view/src/tag-reader.coffee
	src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee
	src/packages/fuzzy-finder/src/fuzzy-finder.coffee
2012-12-18 20:32:05 -07:00
Nathan Sobo
4ce8583cb2 Rename extensions to packages
We now look at the `core.disabledPackages` config key. Rename the `src/extensions` directory to `src/packages`. The config object now talks about loading packages instead of extensions.
2012-12-18 20:03:21 -07:00
Nathan Sobo
37f0aa3f90 Replace window.requireExtension with atom.loadPackage
The goal is that `loadPackage` will be the go-to place for loading all kinds of resources out of directories. `requireExtension` was only designed to load and activate extension modules.
2012-12-18 19:47:20 -07:00
Kevin Sawicki
2256962129 Support grammar fileTypes that contains more than extensions
The Git bundle registers fileTypes with multiple path segments
such as '.git/config'
2012-12-18 17:48:24 -08:00
Kevin Sawicki
2c4ba3d3b1 Ignore preferences with no scope 2012-12-18 16:44:20 -08:00
Kevin Sawicki
127174ebd0 Support uncommenting lines with leading whitespace 2012-12-18 15:52:23 -08:00
Kevin Sawicki
1b8e816d95 Support bundles that have a TM_COMMENT_END variable
The value of TM_COMMENT_END is now considered if present
in the bundle's preferences when commenting and uncommenting
selected lines
2012-12-18 15:52:23 -08:00
Nathan Sobo
cdc1fdf7d7 💄 for atom.coffee. Preparing the LZ for atom.loadBundle 2012-12-18 15:41:57 -07:00
Corey Johnson
8e4142aa8e Give EditSessions a chance to render before displaying alerts 2012-12-18 14:11:54 -08:00
Kevin Sawicki
175a74d2ec Support preferences registered via a comma-separated scope list 2012-12-18 10:54:26 -08:00
Kevin Sawicki
908e731694 Remove unneeded requireStylesheet
Stylesheet is already required in super class
2012-12-18 09:03:08 -08:00
Kevin Sawicki
586b149e81 Remove unused require 2012-12-18 08:59:51 -08:00
Kevin Sawicki
9823f5ba85 Add spec for busting the cache on window focus 2012-12-18 08:49:58 -08:00
Coby Chapple
dd8aff6e69 make cursor change to pointer when hovering over close tab icon 2012-12-18 15:46:38 +00:00
Kevin Sawicki
d7882711e4 Clear project paths when window gains focus 2012-12-17 22:43:40 -08:00
Nathan Sobo
e2457b90ac Disable extensions w/ config.core.disabledExtensions
This replaces the `config.core.extensions` array with just an array of the extensions you don't want to load. The previous solution was attempting to allow the user to control extension load order, but we're not actually sure that's a good idea and this is simpler.
2012-12-17 21:06:36 -07:00
Nathan Sobo
fc9bf38a2a *Must* use get and set to access config values.
The `config` object no longer stores config properties directly. Instead it stores them on an internal `settings` object, which makes it easier to serialize settings without getting them mixed up with non-setting state on the `config` object.
2012-12-17 20:56:37 -07:00
Kevin Sawicki
8afe4dbaef Add extension to keep or add a single trailing newline 2012-12-17 18:31:29 -08:00
Nathan Sobo
b82fe25b99 When observing a key path, compare its new & old values structurally 2012-12-17 19:00:47 -07:00
Kevin Sawicki
07a5672e20 Use command() instead of on() for document events
Allows commands such as 'open-user-configuration' to
appear and be invoked from the event palette
2012-12-17 17:59:37 -08:00
Nathan Sobo
a7d1a29748 Use config.get/set methods. config.update now takes no args. 2012-12-17 18:52:20 -07:00
Kevin Sawicki
a53537df20 Darken tab close icon color 2012-12-17 17:27:18 -08:00
Kevin Sawicki
ee0dbe4e66 Set tab font-size to 90% 2012-12-17 17:08:05 -08:00
Corey Johnson & Nathan Sobo
bc49be6c2c Move project.ignoredNames to config.core.ignoredNames 2012-12-17 16:54:09 -08:00
Kevin Sawicki
80b71582e0 Maintain cursor position when buffer is reloaded 2012-12-17 16:50:32 -08:00
Corey Johnson & Nathan Sobo
0c12929007 💩 2012-12-17 16:38:23 -08:00
Corey Johnson & Nathan Sobo
f62ef2e68b Lower inputThrottle on Select Lists to 50ms 2012-12-17 16:37:27 -08:00
Corey Johnson & Nathan Sobo
9f8547a8da Add config.fuzzy-finder.ignoredNames 2012-12-17 16:37:27 -08:00
Corey Johnson & Nathan Sobo
6aafb73389 Add get and set to config 2012-12-17 16:37:27 -08:00
Kevin Sawicki
6183680d15 Don't bubble up up/down events triggered on preview list 2012-12-17 16:37:27 -08:00
Kevin Sawicki
62ddf8219f Trim struct: prefix in display output 2012-12-17 16:37:27 -08:00
Kevin Sawicki
f06d4519ca Only expect prefix when there are 5 or more segments 2012-12-17 16:37:27 -08:00
Kevin Sawicki
af99bac30a Support opening project outline view without open editor 2012-12-17 16:37:27 -08:00
Kevin Sawicki
57e45883bb Don't reuse buffer paths as project paths 2012-12-17 16:37:27 -08:00
Kevin Sawicki
9dbf07d81e Update event name in outline-view keymap 2012-12-17 16:37:27 -08:00
Kevin Sawicki
025122d642 Add project outline view with all tags
Opened via meta-J and limited to a maximum
of 10 tags similar to fuzzy-finder.
2012-12-17 16:37:27 -08:00
Kevin Sawicki
e690f00994 Don't bubble up up/down events triggered on preview list 2012-12-17 14:08:46 -08:00
Kevin Sawicki
9e4325d8b2 Trim struct: prefix in display output 2012-12-17 11:25:55 -08:00
Kevin Sawicki
9ea2f56f6e Only expect prefix when there are 5 or more segments 2012-12-17 11:25:03 -08:00
Kevin Sawicki
39db08ed57 Support opening project outline view without open editor 2012-12-17 11:09:34 -08:00
Kevin Sawicki
b1e49f6dd5 Don't reuse buffer paths as project paths 2012-12-17 10:55:54 -08:00
Kevin Sawicki
5e1fd35ac0 Update event name in outline-view keymap 2012-12-17 10:37:01 -08:00
Kevin Sawicki
39408ec28d Add project outline view with all tags
Opened via meta-J and limited to a maximum
of 10 tags similar to fuzzy-finder.
2012-12-17 10:19:59 -08:00
Nathan Sobo
04ab7fa469 Make markdown preview ctrl-m, since meta-m *minimizes* 💩 2012-12-16 22:14:33 -07:00
Nathan Sobo
2892ec9ecf Put user extensions directory (~/.atom/extensions) on the load path 2012-12-16 12:14:39 -08:00
Nathan Sobo
4538a70859 Add config.editor.autosave 2012-12-16 11:30:06 -08:00
Nathan Sobo
d311dac39f 💄 2012-12-16 11:29:52 -08:00
Nathan Sobo
001a6500c6 Config requires all non-banged extensions listed in core.extensions 2012-12-16 11:25:52 -08:00
Nathan Sobo
bc7dc5d911 💄 2012-12-16 11:24:55 -08:00
Nathan Sobo
20bd670d8e 💄 2012-12-16 11:06:47 -08:00
Nathan Sobo
64ff05d481 Simplify config.core.extensions array 2012-12-14 17:14:58 -08:00
Nathan Sobo
b7fd9debd6 Only call once after registering extensions 2012-12-14 17:03:12 -08:00
Corey Johnson & Nathan Sobo
cc44508b58 Register extensions in core.extensions on Config.load 2012-12-14 16:38:44 -08:00
Corey Johnson & Nathan Sobo
e6362af711 Rename subscription.destroy to subscription.cancel 2012-12-14 16:38:04 -08:00
Corey Johnson & Nathan Sobo
8a675fd538 Use config.update w/ a key path everywhere we update the config 2012-12-14 15:21:36 -08:00
Corey Johnson & Nathan Sobo
827d6b57fb Use observeConfig in Editor 2012-12-14 15:01:31 -08:00
Corey Johnson & Nathan Sobo
8554df2346 Use .subscribe and .observeConfig in WrapGuide 2012-12-14 14:49:57 -08:00
Corey Johnson & Nathan Sobo
b822cd7779 View#subscribe subscribes to an event emitter 2012-12-14 14:40:51 -08:00
Corey Johnson & Nathan Sobo
528fae9466 Cleanup all subscriptions when a view is removed from the DOM 2012-12-14 14:29:20 -08:00
Corey Johnson & Nathan Sobo
55dc3e1cdf Merge branch 'master' into config
Conflicts:
	spec/app/project-spec.coffee
	src/extensions/wrap-guide/src/wrap-guide.coffee
2012-12-14 14:14:50 -08:00
Kevin Sawicki & Nathan Sobo
b91c353d2b Add View#observeConfig as a space-pen extension 2012-12-14 14:08:57 -08:00
Kevin Sawicki
0bb1442652 Clear loading message when setting error 2012-12-14 10:17:26 -08:00
Kevin Sawicki & Nathan Sobo
97c6956e3f Only generate the tree with updateRoot in the TreeView 2012-12-13 17:29:34 -08:00
Kevin Sawicki & Nathan Sobo
9205b67649 💄 2012-12-13 17:29:14 -08:00
Kevin Sawicki
74faacf229 Trim tag pattern 2012-12-13 17:20:37 -08:00
Kevin Sawicki
0f4d8bf51c Use meta-. to jump to declaration 2012-12-13 17:14:50 -08:00
Kevin Sawicki
d8461641b9 Display matches when more than one tag is found 2012-12-13 17:12:42 -08:00
Kevin Sawicki
1686c97244 Add initial support for jump to declaration 2012-12-13 15:22:23 -08:00
Kevin Sawicki
7a7bdd7f8e Move to first character of line that symbol is on 2012-12-13 10:35:50 -08:00
Kevin Sawicki
d5c6acd2ce 💄 2012-12-13 09:58:06 -08:00
Kevin Sawicki
bcb92cf4e7 Show loading message when generating symbols 2012-12-13 09:50:30 -08:00
Kevin Sawicki & Nathan Sobo
49d817a9c4 Observe the config from tree view to show/hide git-ignored files 2012-12-12 18:19:21 -08:00
Nathan Sobo
0a1b389994 Add Config#observe, which watches a key path for changes 2012-12-12 18:19:02 -08:00
Kevin Sawicki
0625a92713 Unsubscribe from root view when editor is being removed 2012-12-12 17:38:42 -08:00
Corey Johnson & Kevin Sawicki
a6a05b6ff4 Remove directories from fuzzy-finder 2012-12-12 17:25:45 -08:00
Corey Johnson & Kevin Sawicki
6f6dfe78a9 Clear timeout when select-list is cancelled 2012-12-12 17:21:08 -08:00
Nathan Sobo
aedc86705e Merge branch 'master' into config 2012-12-12 16:48:58 -08:00
Nathan Sobo
8945a3f64b Fix wrap guide's font size subscription 2012-12-12 16:32:07 -08:00
Nathan Sobo
c19c9e0d1f Save config changes on update 2012-12-12 15:49:01 -08:00
Corey Johnson & Kevin Sawicki
f8dd51cab6 Increase input throttle to 200ms 2012-12-12 15:48:59 -08:00
Corey Johnson & Kevin Sawicki
e15306d8cc Clear array when window receives focus 2012-12-12 15:46:21 -08:00
Corey Johnson & Kevin Sawicki
0c68295ec6 Empty fuzzy-finder list on cancel 2012-12-12 15:40:36 -08:00
Nathan Sobo
3c2b84a46d Add config.editor.fontSize 2012-12-12 15:23:36 -08:00
Corey Johnson & Kevin Sawicki
81eed5e410 Cache project paths in fuzzy-finder 2012-12-12 15:06:14 -08:00
Corey Johnson & Kevin Sawicki
0b239c8f37 Debounce filter input on select lists 2012-12-12 14:52:31 -08:00
Nathan Sobo
8088e4d90c Add config.editor.invisibles field for customizing invisible glyphs. 2012-12-12 14:45:58 -08:00
Corey Johnson & Kevin Sawicki
77e4e41c7b Check all path segments for ignored names 2012-12-12 13:58:15 -08:00
Nathan Sobo
db0a39679c Remove showInvisibles constructor param on Editor
And remove `showInvisibles` state from the `RootView` now that it's managed via `config`.
2012-12-12 13:55:27 -08:00
Nathan Sobo
b3303bc21d Add config.editor.showInvisibles 2012-12-12 13:50:58 -08:00
Corey Johnson & Kevin Sawicki
9931441b9a Clear list when showing loading or error message 2012-12-12 13:32:53 -08:00
Nathan Sobo
2a901e78f9 Identify editor when subscribing to window resize 2012-12-12 13:28:29 -08:00
Corey Johnson & Kevin Sawicki
404f637101 Populate fuzzy-finder asynchronously 2012-12-12 12:26:39 -08:00