From 1cba71950d72a87d6ac70d76e62e18edc2bdb732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Tue, 1 Dec 2020 22:42:07 +0100 Subject: [PATCH] Respect "enabled" key in plugin configuration (#44) --- st3/lsp_utils/_client_handler/abstract_plugin.py | 2 +- st3/lsp_utils/_client_handler/language_handler.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/st3/lsp_utils/_client_handler/abstract_plugin.py b/st3/lsp_utils/_client_handler/abstract_plugin.py index 28d9419..cbca939 100644 --- a/st3/lsp_utils/_client_handler/abstract_plugin.py +++ b/st3/lsp_utils/_client_handler/abstract_plugin.py @@ -126,6 +126,7 @@ def get_default_settings_schema(cls) -> Dict[str, Any]: return { 'auto_complete_selector': '', 'command': [], + 'enabled': True, 'env': {}, 'experimental_capabilities': {}, 'ignore_server_trigger_chars': False, @@ -136,7 +137,6 @@ def get_default_settings_schema(cls) -> Dict[str, Any]: @classmethod def on_settings_read_internal(cls, settings: sublime.Settings) -> None: - settings.set('enabled', True) languages = settings.get('languages', None) # type: Optional[List[LanguagesDict]] if languages: settings.set('languages', cls._upgrade_languages_list(languages)) diff --git a/st3/lsp_utils/_client_handler/language_handler.py b/st3/lsp_utils/_client_handler/language_handler.py index 17c7e9b..1e9bc7b 100644 --- a/st3/lsp_utils/_client_handler/language_handler.py +++ b/st3/lsp_utils/_client_handler/language_handler.py @@ -136,6 +136,7 @@ def cleanup(cls) -> None: def get_default_settings_schema(cls) -> Dict[str, Any]: return { 'command': [], + 'enabled': True, 'env': {}, 'experimental_capabilities': {}, 'initializationOptions': {},