-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
- Loading branch information
Showing
3 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
def plugin_reload() -> None: | ||
def reload_plugin() -> None: | ||
import sys | ||
|
||
# Remove all previously loaded plugin modules. | ||
prefix = f"{__package__}." | ||
for module_name in tuple(filter(lambda m: m.startswith(prefix) and m != __name__, sys.modules)): | ||
del sys.modules[module_name] | ||
|
||
|
||
plugin_reload() | ||
reload_plugin() | ||
|
||
from .plugin import set_up | ||
from .plugin import tear_down | ||
from .plugin.FollowLnk import * # noqa: F401, F403 | ||
import sublime | ||
|
||
|
||
def plugin_loaded() -> None: | ||
sublime.set_timeout_async(set_up) | ||
|
||
|
||
def plugin_unloaded() -> None: | ||
tear_down() | ||
from .plugin import * # noqa: F401, F403 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
def set_up() -> None: | ||
"""plugin_loaded""" | ||
# import all listeners and commands | ||
from .listener import FollowLnkViewEventListener | ||
|
||
__all__ = ( | ||
# ST: core | ||
"plugin_loaded", | ||
"plugin_unloaded", | ||
# ST: listeners | ||
"FollowLnkViewEventListener", | ||
) | ||
|
||
|
||
def plugin_loaded() -> None: | ||
pass | ||
|
||
|
||
def tear_down() -> None: | ||
"""plugin_unloaded""" | ||
def plugin_unloaded() -> None: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters