chore(ST2.WebPackages): bump CoffeeComplete

This commit is contained in:
Iristyle
2013-04-15 08:28:35 -04:00
parent d37916f35d
commit 6ad8dc2ce1
4 changed files with 29 additions and 27 deletions

View File

@@ -40,11 +40,5 @@
// OBSOLETE
// Aliases for "this", like "that" and "self".
// CA+ assignment detection is now able to detect that = this assignments.
"coffee_autocomplete_plus_this_aliases": ["that", "self"],
// The triggers for autocompletion
"auto_complete_triggers":
[
{"characters": ".@", "selector": "source.coffee, source.litcoffee, source.coffee.md"}
]
"coffee_autocomplete_plus_this_aliases": ["that", "self"]
}

View File

@@ -33,9 +33,11 @@ Usage
### Autocomplete
Autocomplete can be triggered in coffee files by typing the dot `.` operator or the `@` symbol (which is shorthand for `this`). You can also press `ctrl+space` to trigger autocompletions manually. The plugin will then try to figure out what you're doing and propose a list of suggestions.
Autocomplete can be triggered in coffee files by typing the dot `.` operator or the `@` symbol (which is shorthand for `this`) and then by pressing `ctrl+space`. The plugin will then try to figure out what you're doing and propose a list of suggestions.
Example usage: Inside a class, you type `this.`. A list of the available methods and properties is presented.
It is also possible to configure Sublime Text to trigger autocomplete automatically, without having to press `ctrl+space`. This is not part of the plugin as there may be other triggers from other plugins that might be overwritten, but it's easy to add! See [Customizing Autocomplete Trigger](#customizing-autocomplete-trigger) for how to do this.
Example usage: Inside a class, you type `this.` and press `ctrl+space`. A list of the available methods and properties is presented.
### Goto Definition
@@ -267,7 +269,26 @@ Configuration
CoffeeComplete Plus has the following configurable settings:
### General Settings
### User Settings
These settings are accessible via `Preferences -> Settings — User`.
#### Customizing Autocomplete Trigger
* `auto_complete_triggers` — Characters that trigger the autocomplete menu.
- Sublime allows for context-specific triggers for the autocompletion menus. This allows the menu to show as soon as `.` or `@` are pressed. To add triggers for CoffeeScript autocompletions, open `Preferences -> Settings — User` and use the following to make the desired changes:
```
"auto_complete_triggers":
[
{"characters": ".@", "selector": "source.coffee, source.litcoffee, source.coffee.md"}
]
```
- Note that other `auto_complete_triggers` settings may be present in `Preferences -> Settings — Default`. If this is the case, simply copy the `auto_complete_triggers` from the default file into your user settings, add a comma inside the square brackets, and paste the curly brace section above.
### General CoffeeComplete Settings
In `CoffeeComplete Plus.sublime-settings`:
@@ -304,19 +325,6 @@ In `CoffeeComplete Plus.sublime-settings`:
"coffee_autocomplete_plus_member_exclusion_regexes": ["^_"] // Excludes members prefixed with underscore
```
#### Customizing Autocomplete Trigger
* `auto_complete_triggers` — Characters that trigger the autocomplete menu.
- Sublime allows for context-specific triggers for the autocompletion menus. This allows the menu to show as soon as `.` or `@` are pressed, which are enabled by default. To customize these, use the following in settings and make the desired changes:
```
"auto_complete_triggers":
[
{"characters": ".@", "selector": "source.coffee"}
]
```
#### Aliases For `this`
* `coffee_autocomplete_plus_this_aliases` — Aliases for `this` keyword

View File

@@ -28,7 +28,7 @@ FUNCTION_RETURN_TYPE_FUNCTION_NAMES_KEY = "function_names"
COFFEESCRIPT_SYNTAX = r"CoffeeScript"
COFFEE_EXTENSION_WITH_DOT = "\.coffee|\.litcoffee|\.coffee\.md"
CONSTRUCTOR_KEYWORD = "constructor"
CONSTRUCTOR_KEYWORDS = ["constructor", "initialize", "init"]
THIS_SUGAR_SYMBOL = "@"
THIS_KEYWORD = "this"
PERIOD_OPERATOR = "."
@@ -55,7 +55,7 @@ PARAM_REGEX = r"\(\s*(({name})|({name}\s*=?.*?[,].*?)|(.*?[,]\s*{name}\s*=?.*?[,
# Regex for finding a variable declared in a for loop.
FOR_LOOP_REGEX = r"for\s*.*?[^a-zA-Z0-9_$]%s[^a-zA-Z0-9_$]"
# Regex for constructor @ params, used for type hinting.
CONSTRUCTOR_SELF_ASSIGNMENT_PARAM_REGEX = r"constructor\s*[:]\s*\(\s*((@{name})|(@{name}\s*[,].*?)|(.*?[,]\s*@{name}\s*[,].*?)|(.*?[,]\s*@{name}))\s*\)\s*[=\-]>\s*$"
CONSTRUCTOR_SELF_ASSIGNMENT_PARAM_REGEX = r"(?:(?:constructor)|(?:initialize)|(?:init))\s*[:]\s*\(\s*((@{name})|(@{name}\s*[,].*?)|(.*?[,]\s*@{name}\s*[,].*?)|(.*?[,]\s*@{name}))\s*\)\s*[=\-]>\s*$"
# Assignment with the value it's being assigned to. Matches:
# blah = new Dinosaur()
@@ -901,7 +901,7 @@ def collect_instance_completions_from_file(file_lines, class_name, is_inherited,
function_name = match.group(2)
function_args_string = match.group(5)
if show_private or not is_member_excluded(function_name, member_exclusion_regexes):
if function_name != CONSTRUCTOR_KEYWORD:
if not function_name in CONSTRUCTOR_KEYWORDS:
function_args_list = []
if function_args_string:
function_args_list = function_args_string.split(",")

View File

@@ -1 +1 @@
{"url": "https://github.com/justinmahar/SublimeCSAutocompletePlus", "version": "2013.03.20.10.00.10", "description": "CoffeeScript autocompletions and more!"}
{"url": "https://github.com/justinmahar/SublimeCSAutocompletePlus", "version": "2013.04.05.11.19.57", "description": "CoffeeScript autocompletions and more!"}