Skip to content

Commit

Permalink
add pyright spec
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntan committed Apr 26, 2021
1 parent 3128c34 commit d69025a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python_packages/jupyter_lsp/jupyter_lsp/specs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .jedi_language_server import JediLanguageServer
from .julia_language_server import JuliaLanguageServer
from .pyls import PythonLanguageServer
from .pyright import PyrightLanguageServer
from .r_languageserver import RLanguageServer
from .sql_language_server import SQLLanguageServer
from .texlab import Texlab
Expand All @@ -26,6 +27,7 @@
julia = JuliaLanguageServer()
md = UnifiedLanguageServer()
py = PythonLanguageServer()
pyright = PyrightLanguageServer()
r = RLanguageServer()
tex = Texlab()
ts = JavascriptTypescriptLanguageServer()
Expand Down
21 changes: 21 additions & 0 deletions python_packages/jupyter_lsp/jupyter_lsp/specs/pyright.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from .utils import NodeModuleSpec


class PyrightLanguageServer(NodeModuleSpec):
node_module = key = "pyright"
script = ["langserver.index.js"]
args = ["--stdio"]
languages = ["python"]
spec = dict(
display_name=key,
mime_types=["text/python", "text/x-ipython"],
urls=dict(
home="https://github.com/microsoft/pyright",
issues="https://github.com/microsoft/pyright/issues",
),
install=dict(
npm="npm install --save-dev {}".format(key),
yarn="yarn add --dev {}".format(key),
jlpm="jlpm add --dev {}".format(key),
),
)
1 change: 1 addition & 0 deletions python_packages/jupyter_lsp/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jupyter_lsp_spec_v1 =
jedi-language-server = jupyter_lsp.specs:jedi
julia-language-server = jupyter_lsp.specs:julia
python-language-server = jupyter_lsp.specs:py
pyright = jupyter_lsp.specs:pyright
r-languageserver = jupyter_lsp.specs:r
texlab = jupyter_lsp.specs:tex
sql-language-server = jupyter_lsp.specs:sql
Expand Down

0 comments on commit d69025a

Please sign in to comment.