Python implementation of the Language Server Protocol.
Reason this release was yanked:
deprecated
Project description
Language Server Protocol implementation for Python
lsprotocol
is a python implementation of object types used in the Language Server Protocol (LSP). This repository contains the code generator and the generated types for LSP.
Overview
LSP is used by editors to communicate with various tools to enables services like code completion, documentation on hover, formatting, code analysis, etc. The intent of this library is to allow you to build on top of the types used by LSP. This repository will be kept up to date with the latest version of LSP as it is updated.
Installation
python -m pip install lsprotocol
Usage
Using LSP types
from lsprotocol import types
position = types.Position(line=10, character=3)
Using built-in type converters
# test.py
import json
from lsprotocol import converters, types
position = types.Position(line=10, character=3)
converter = converters.get_converter()
print(json.dumps(converter.unstructure(position, unstructure_as=types.Position)))
Output:
> python test.py
{"line": 10, "character": 3}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lsprotocol-2022.0.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99966805b06356ad46b2353c50751f2c51e14913ecb61eec674a9dea2da2bbcd |
|
MD5 | 9dfe64e5e586977a753ededeaf9d5d63 |
|
BLAKE2b-256 | 8033cf71344750410f1d091cfc6c4deaf6fb8f8c8a1284fbff9e1eae5509cf0b |