-
Notifications
You must be signed in to change notification settings - Fork 379
Expand file tree
/
Copy pathplugin.py
More file actions
116 lines (106 loc) · 4.12 KB
/
Copy pathplugin.py
File metadata and controls
116 lines (106 loc) · 4.12 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import sys
# clear modules cache if package is reloaded (after update?)
prefix = __spec__.parent + "." # 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 != __spec__.name
]:
del sys.modules[module_name]
globals().pop("module_name", None)
del globals()["prefix"]
from .latextools.auto_label import (
LatextoolsAutoInserLabelListener,
LatextoolsAutoInsertLabelCommand,
)
from .latextools.biblatex_crossref_completions import BiblatexCrossrefCompletions
from .latextools.biblatex_field_name_completions import FieldNameCompletions
from .latextools.biblatex_name_completions import BiblatexNameCompletions
from .latextools.biblatex_syntax_listener import BibLaTeXSyntaxListener
from .latextools.change_environment import (
LatextoolsChangeEnvironmentCommand,
LatextoolsToggleEnvironmentStarCommand,
)
from .latextools.context_provider import LatextoolsContextListener
from .latextools.delete_temp_files import (
LatextoolsClearCacheCommand,
LatextoolsClearLocalCacheCommand,
LatextoolsDeleteTempFilesCommand,
)
from .latextools.detect_spellcheck import (
LatextoolsAutoDetectSpellcheckListener,
LatextoolsDetectSpellcheckCommand,
)
from .latextools.jumpto_anywhere import (
LatextoolsJumptoAnywhereByMouseCommand,
LatextoolsJumptoAnywhereCommand,
)
from .latextools.jumpto_pdf import (
LatextoolsJumptoPdfCommand,
LatextoolsViewPdfCommand,
)
from .latextools.jumpto_tex_file import LatextoolsJumptoFileCommand
from .latextools.latex_command import LatextoolsLatexCmdCommand
from .latextools.latex_command_completions import LatexCmdCompletion
from .latextools.latex_directive_completions import LatexDirectiveCompletion
from .latextools.latex_doc_viewer import (
LatextoolsPkgDocCommand,
LatextoolsViewDocCommand,
)
from .latextools.latex_env import LatextoolsLatexEnvCommand
from .latextools.latex_env_closer import LatextoolsLatexEnvCloserCommand
from .latextools.latex_fill_all import (
LatexFillAllEventListener,
LatextoolsFillAllCommand,
LatexToolsFillAllCompleteBracket,
LatexToolsReplaceWord,
)
from .latextools.latex_installed_packages import LatextoolsGenPkgCacheCommand
from .latextools.latextools_cache_listener import (
LatextoolsAnalysisUpdateCommand,
LatextoolsBibcacheUpdateCommand,
LatextoolsCacheUpdateListener,
)
from .latextools.make_pdf import (
LatextoolsExecEventListener,
LatextoolsMakePdfCommand,
)
from .latextools.preview import ImagePreviewHoverListener, PreviewPhantomListener
from .latextools.reset_settings import LatextoolsResetSettingsCommand
from .latextools.reveal_folders import (
LatextoolsRevealAuxDirectoryCommand,
LatextoolsRevealOutputDirectoryCommand,
LatextoolsRevealTexRootDirectoryCommand,
)
from .latextools.search_commands import (
LatextoolsSearchCommandCommand,
LatextoolsSearchCommandInputCommand,
)
from .latextools.smart_paste import (
LatextoolsDownloadInsertImageHelperCommand,
LatextoolsSmartPasteCommand,
)
from .latextools.system_check import LatextoolsSystemCheckCommand
from .latextools.tex_count import LatextoolsTexcountCommand
from .latextools.tex_syntax_listener import TeXSyntaxListener
from .latextools.toc_quickpanel import (
LatextoolsTocQuickpanelCommand,
LatextoolsTocQuickpanelContext,
)
from .latextools.toggle_settings import LatextoolsToggleKeysCommand
from .latextools.utils.tex_log import LatextoolsDumpTexLog
from .plugins.viewer.dbus_viewer import LatextoolsDbusViewerListener
def plugin_loaded():
from .latextools.utils.logging import init_logger
init_logger()
prefix = __spec__.parent + "."
for name, module in sys.modules.items():
if name.startswith(prefix) and hasattr(module, "latextools_plugin_loaded"):
module.latextools_plugin_loaded()
def plugin_unloaded():
prefix = __spec__.parent + "."
for name, module in sys.modules.items():
if name.startswith(prefix) and hasattr(module, "latextools_plugin_unloaded"):
module.latextools_plugin_unloaded()
from .latextools.utils.logging import shutdown_logger
shutdown_logger()