Skip to content

Commit

Permalink
Default type to __all__ (#607)
Browse files Browse the repository at this point in the history
* Default type to __all__

Resolves #604

* Adjust documentation to reflect keybinding change
  • Loading branch information
facelessuser authored Sep 2, 2022
1 parent 31df9ea commit e703360
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 16 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# BracketHighlighter

## 2.29.5
## 2.30.0

- **NEW**: When defining key bindings `type` is now defaulted to `['__all__']` if not set.
- **FIX**: Ensure Jinja2 support for works for the Jinja2 package (support existed for some older package).

## 2.29.4
Expand Down
10 changes: 1 addition & 9 deletions Example.sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"lines" : true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect",
"args": {"select": "left"}
}
Expand All @@ -41,7 +40,6 @@
"lines" : true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect",
"args": {"select": "right"}
}
Expand All @@ -58,7 +56,6 @@
"lines" : true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect",
"args": {"select": "left", "extend": true}
}
Expand All @@ -75,7 +72,6 @@
"lines" : true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect",
"args": {"select": "right", "extend": true}
}
Expand All @@ -98,8 +94,7 @@
"args": {
"plugin": {
"args": {"select": "right", "alternate": true},
"command": "bh_modules.bracketselect",
"type": ["__all__"]
"command": "bh_modules.bracketselect"
},
"lines": true,
"no_outside_adj": null
Expand All @@ -115,7 +110,6 @@
"lines" : true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect"
}
}
Expand All @@ -130,7 +124,6 @@
"lines" : true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect",
"args": {"always_include_brackets": true}
}
Expand Down Expand Up @@ -199,7 +192,6 @@
"args":
{
"plugin": {
"type": ["__all__"],
"command" : "bh_modules.foldbracket"
}
}
Expand Down
2 changes: 2 additions & 0 deletions bh_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def setup(
if 'type' in plugin:
for target in plugin["type"]:
self.plugin_targets.add(target)
else:
self.plugin_targets.add('__all__')

# Region selection, highlight, management
self.regions = bh_regions.BhRegion(alter_select, count_lines)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/markdown/customize.md
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ circumstance it is run, and with what parameters it is run with.

Parameter | Description
--------- | -----------
`type` | An array containing the bracket definition names that the plugin should be run on. Use `__all__` for all bracket definitions.
`type` | An array containing the bracket definition names that the plugin should be run on. If `type` is not set, `['__all__']` will be used signifying all bracket definitions.
`command` | The plugin to run. For internal plugins, they are referenced by `bh_modules.<plugin name>`. For custom plugins, you should use the folder path relative to `Packages`. So if I had a plugin called `myplugin.py` in my `User/bh_modules` folder, I would use `User.bh_modules.myplugin`.
`args` | A dictionary containing the arguments to feed into the plugin.

Expand Down
2 changes: 1 addition & 1 deletion messages.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"install": "messages/install.md",
"2.29.0": "messages/recent.md"
"2.30.0": "messages/recent.md"
}
8 changes: 5 additions & 3 deletions messages/recent.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# BracketHighlighter 2.29.0
# BracketHighlighter 2.30.0

New release!

A restart might be required. If you see issues immediately after the update
please try restarting.

Please see `Preferences->Package Settings->BracketHighlighter->Changelog`
for more info about the release.
## 2.30.0

- **NEW**: When defining key bindings `type` is now defaulted to `['__all__']` if not set.
- **FIX**: Ensure Jinja2 support for works for the Jinja2 package (support existed for some older package).
2 changes: 1 addition & 1 deletion support.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import webbrowser
import re

__version__ = "2.29.5"
__version__ = "2.30.0"
__pc_name__ = 'BracketHighlighter'

CSS = '''
Expand Down

0 comments on commit e703360

Please sign in to comment.