basedpyright.py 723 B

1234567891011121314151617181920212223
  1. from .config import load_config_schema
  2. from .utils import ShellSpec
  3. class BasedPyrightLanguageServer(ShellSpec):
  4. key = "basedpyright"
  5. cmd = "basedpyright-langserver"
  6. args = ["--stdio"]
  7. languages = ["python"]
  8. spec = dict(
  9. display_name=key,
  10. mime_types=["text/python", "text/x-ipython"],
  11. urls=dict(
  12. home="https://github.com/DetachHead/basedpyright",
  13. issues="https://github.com/DetachHead/basedpyright/issues",
  14. ),
  15. install=dict(
  16. pip="pip install basedpyright",
  17. conda="conda install -c conda-forge basedpyright",
  18. ),
  19. config_schema=load_config_schema(key),
  20. requires_documents_on_disk=False,
  21. )