Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python LSP Server #582

Merged
merged 8 commits into from
Apr 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions python_packages/jupyter_lsp/jupyter_lsp/specs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from .javascript_typescript_langserver import JavascriptTypescriptLanguageServer
from .jedi_language_server import JediLanguageServer
from .julia_language_server import JuliaLanguageServer
from .pyls import PythonLanguageServer
from .pyls import PalantirPythonLanguageServer
from .python_lsp_server import PythonLSPServer
from .r_languageserver import RLanguageServer
from .sql_language_server import SQLLanguageServer
from .texlab import Texlab
Expand All @@ -25,7 +26,8 @@
json = VSCodeJSONLanguageServer()
julia = JuliaLanguageServer()
md = UnifiedLanguageServer()
py = PythonLanguageServer()
py_palantir = PalantirPythonLanguageServer()
py_lsp_server = PythonLSPServer()
r = RLanguageServer()
tex = Texlab()
ts = JavascriptTypescriptLanguageServer()
Expand Down
2 changes: 1 addition & 1 deletion python_packages/jupyter_lsp/jupyter_lsp/specs/pyls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .utils import PythonModuleSpec


class PythonLanguageServer(PythonModuleSpec):
class PalantirPythonLanguageServer(PythonModuleSpec):
python_module = key = "pyls"
languages = ["python"]
spec = dict(
Expand Down
49 changes: 49 additions & 0 deletions python_packages/jupyter_lsp/jupyter_lsp/specs/python_lsp_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from .config import load_config_schema
from .utils import PythonModuleSpec


class PythonLSPServer(PythonModuleSpec):
python_module = key = "python-lsp-server"
languages = ["python"]
spec = dict(
display_name="python-lsp-server",
mime_types=["text/python", "text/x-ipython"],
urls=dict(
home="https://github.com/python-lsp/python-lsp-server",
issues="https://github.com/python-lsp/python-lsp-server/issues",
),
install=dict(
pip="pip install 'python-lsp-server[all]'",
conda="conda install -c conda-forge python-lsp-server",
),
extend=[
dict(
display_name="pyls-mypy",
install=dict(
pip="pip install pyls-mypy", conda="conda install pyls-mypy"
),
),
dict(
display_name="pyls-black",
install=dict(
pip="pip install pyls-black", conda="conda install pyls-black"
),
),
dict(
display_name="pyls-isort",
install=dict(
pip="pip install pyls-isort",
conda="conda install pyls-isort",
),
),
dict(
display_name="pyls-memestra",
install=dict(
pip="pip install pyls-memestra",
conda="conda install pyls-memestra",
),
),
],
config_schema=load_config_schema(key),
krassowski marked this conversation as resolved.
Show resolved Hide resolved
env=dict(PYTHONUNBUFFERED="1"),
)
3 changes: 2 additions & 1 deletion python_packages/jupyter_lsp/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jupyter_lsp_spec_v1 =
javascript-typescript-langserver = jupyter_lsp.specs:ts
jedi-language-server = jupyter_lsp.specs:jedi
julia-language-server = jupyter_lsp.specs:julia
python-language-server = jupyter_lsp.specs:py
python-language-server = jupyter_lsp.specs:py_palantir
python-lsp-server = jupyter_lsp.specs:py_lsp_server
r-languageserver = jupyter_lsp.specs:r
texlab = jupyter_lsp.specs:tex
sql-language-server = jupyter_lsp.specs:sql
Expand Down