diff --git a/plugin.py b/plugin.py index 97771df..4d0ce4b 100644 --- a/plugin.py +++ b/plugin.py @@ -1,8 +1,6 @@ from LSP.plugin import ClientConfig from LSP.plugin import uri_to_filename from LSP.plugin import WorkspaceFolder -from LSP.plugin.core.edit import apply_workspace_edit -from LSP.plugin.core.edit import TextEditTuple from LSP.plugin.core.protocol import Point from LSP.plugin.core.typing import Any, Callable, Dict, List, Mapping, Optional from LSP.plugin.core.views import point_to_offset @@ -11,6 +9,14 @@ import os import sublime +try: + from LSP.plugin.core.edit import apply_workspace_edit + from LSP.plugin.core.edit import TextEditTuple +except ImportError: + # Not supported in ST3 + TextEditTuple = Any + pass + def plugin_loaded(): LspTypescriptPlugin.setup()