From 5fb7767e0761d7f1ccad6aabaa656a50ef261a72 Mon Sep 17 00:00:00 2001 From: Sam Roeca Date: Sun, 18 Aug 2019 23:42:33 -0400 Subject: [PATCH] Add explicit default environment Inspired by jedi-vim --- jedi_language_server/server_utils.py | 2 ++ pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jedi_language_server/server_utils.py b/jedi_language_server/server_utils.py index 61627c4..388f9c7 100644 --- a/jedi_language_server/server_utils.py +++ b/jedi_language_server/server_utils.py @@ -4,6 +4,7 @@ from jedi import Script from jedi.api.classes import Definition +from jedi.api.environment import get_cached_default_environment from pygls.server import LanguageServer from pygls.uris import from_fs_path @@ -34,6 +35,7 @@ def get_jedi_script( path=text_doc.path, line=params.position.line + 1, column=params.position.character, + environment=get_cached_default_environment(), ) diff --git a/pyproject.toml b/pyproject.toml index fbcfa75..f8b8bd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,8 +7,8 @@ line-length = 79 [tool.poetry] name = "jedi-language-server" -version = "0.1.0" -description = "Toml sorting library" +version = "0.1.1" +description = "A language server for Jedi!" authors = ["Sam Roeca "] readme = "README.md" homepage = "https://github.com/pappasam/jedi-language-server"