From 1667ba43f0e5248c56f4211761657182a61f9036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Sun, 27 Jun 2021 10:49:32 +0200 Subject: [PATCH] Fix ST3 compatibility (#69) Fixes #68 --- plugin.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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()