Skip to main content

Zero-dependency Python library for Language Server Protocol types

Project description

LSP Types

Publish the excellent work of Sublime LSP as a PyPI package.

Installation

pip install lsp-types

Usage

Using the LSP types:

import lsp_types

# Use the types

Using an LSP session through stdio:

from lsp_types.session import LSPSession, ProcessLaunchInfo

process_info = ProcessLaunchInfo(cmd=[
    "pyright-langserver", "--stdio"
])

async with LSPSession(process_info) as session:
    await session.start()

Development

Requires Python 3.11+.

Generate latest types in one go:

make generate-latest-types

Download the latest json schema:

make download-schemas

Generate the types:

make generate-schemas

Copy the lsp_types/types.py file to your project.

NOTE: Do not import types that begin with __. These types are internal types and are not meant to be used.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsp_types-0.5.0.tar.gz (54.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lsp_types-0.5.0-py3-none-any.whl (55.9 kB view details)

Uploaded Python 3

File details

Details for the file lsp_types-0.5.0.tar.gz.

File metadata

  • Download URL: lsp_types-0.5.0.tar.gz
  • Upload date:
  • Size: 54.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.2.0

File hashes

Hashes for lsp_types-0.5.0.tar.gz
Algorithm Hash digest
SHA256 defa20b7e3e7da533759f9dc87cfce86236ade788e50e16f18f6fa33c10dc4e6
MD5 d5f836f0c2d661c4efef6987b5a2f1df
BLAKE2b-256 ce77973f8963d658c2de0b1d6a2ea2fcc019669824c2a93637b797b130ce0f5c

See more details on using hashes here.

File details

Details for the file lsp_types-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: lsp_types-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 55.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.2.0

File hashes

Hashes for lsp_types-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bec724c8a9e2041596be78ef4dcd3327713e9c101ac40040e8490c7268ea81b
MD5 5271077e777bf13bb6aa5c121adea453
BLAKE2b-256 6413367e70fe9de77c10116fe4c925265ab44d74da71a2735f72d238092e28be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page