-
Notifications
You must be signed in to change notification settings - Fork 1
/
load.py
39 lines (34 loc) · 1.06 KB
/
load.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import sys
prefix = __package__ + "." # Don't clear the base package
for module_name in [
module_name for module_name in sys.modules if module_name.startswith(prefix) and module_name != __name__
]:
del sys.modules[module_name]
from .src.api import ( # noqa: F401, E402
TreeSitterGotoSymbolCommand,
TreeSitterOnSelectionModifiedListener,
TreeSitterPrintTreeCommand,
TreeSitterQuerySymbolCommand,
TreeSitterReloadCommand,
TreeSitterSelectAncestorCommand,
TreeSitterSelectCousinsCommand,
TreeSitterSelectDescendantCommand,
TreeSitterSelectSiblingCommand,
TreeSitterSelectSymbolsCommand,
TreeSitterShowNodeUnderSelectionCommand,
TreeSitterToggleShowNodeUnderSelectionCommand,
)
from .src.core import ( # noqa: F401, E402
TreeSitterEventListener,
TreeSitterInstallLanguageCommand,
TreeSitterRemoveLanguageCommand,
TreeSitterTextChangeListener,
TreeSitterUpdateLanguageCommand,
TreeSitterUpdateTreeCommand,
on_load,
)
def plugin_loaded():
"""
See docstring for `on_load`.
"""
on_load()