diff --git a/bundled/tool/lsp_runner.py b/bundled/tool/lsp_runner.py index f82c029..a1c6a56 100644 --- a/bundled/tool/lsp_runner.py +++ b/bundled/tool/lsp_runner.py @@ -23,8 +23,11 @@ def update_sys_path(path_to_add: str, strategy: str) -> None: # Ensure that we can import LSP libraries, and other bundled libraries. +BUNDLE_DIR = pathlib.Path(__file__).parent.parent +# Always use bundled server files. +update_sys_path(os.fspath(BUNDLE_DIR / "tool"), "useBundled") update_sys_path( - os.fspath(pathlib.Path(__file__).parent.parent / "libs"), + os.fspath(BUNDLE_DIR / "libs"), os.getenv("LS_IMPORT_STRATEGY", "useBundled"), ) diff --git a/bundled/tool/lsp_server.py b/bundled/tool/lsp_server.py index 70c41ae..a21c3e2 100644 --- a/bundled/tool/lsp_server.py +++ b/bundled/tool/lsp_server.py @@ -26,11 +26,15 @@ def update_sys_path(path_to_add: str, strategy: str) -> None: # Ensure that we can import LSP libraries, and other bundled libraries. +BUNDLE_DIR = pathlib.Path(__file__).parent.parent +# Always use bundled server files. +update_sys_path(os.fspath(BUNDLE_DIR / "tool"), "useBundled") update_sys_path( - os.fspath(pathlib.Path(__file__).parent.parent / "libs"), + os.fspath(BUNDLE_DIR / "libs"), os.getenv("LS_IMPORT_STRATEGY", "useBundled"), ) + # ********************************************************** # Imports needed for the language server goes below this. # **********************************************************