Skip to main content

LSP proxy and library to link LSP-enabled editors to Lake LSP servers

Project description

Lspleanklib

This repository is online at both:

Lspleanklib is a low-level library that implements functionality used by Webleank, including:

  • LSP (Language Server Protocol)
  • JSON-RPC
  • Multiplexing multiple lake serve workspace sessions into a single unified editor LSP session
  • Connecting to lake serve via local UNIX domain sockets
  • Running lake serve outside the editor process
  • Proper reading of stdin with Python asyncio

There are no required dependencies on Linux and macOS. However, Windows requires the Python package platformdirs to be installed. The pip install package specification lspleanklib[crossplatform] will add platformdirs as a requirement.

This package also includes two CLI utilities for advanced usage:

  • lspleank: an LSP server used by Webleank to run inside an editor process
  • lakelspout: a stdio LSP proxy that adapts Lake LSP to Leank LSP

For more information, visit Webleank and lean.castedo.com.

Leank LSP Reference

Leank LSP Reference

CLI Reference

The lspleank and lakelspout programs provide low-level functionality. For reference information on the high-level program webleank, see the Webleank README.

Lspleank

Lspleank is an LSP server. It runs as a subprocess, communicating with an editor via stdio.

$ lspleank -h
usage: lspleank  [-h] [--version] {connect,lake,stdio} [-- external_command ...]

Stdio LSP server multiplexing one or more Lake LSP servers.

positional arguments:
  {connect,lake,stdio}
    connect             connect to an lspleank socket service after starting it with the external command
    lake                internally use lakelspout to run Leank LSP servers
    stdio               use the external command to run stdio Leank LSP servers

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

Subcommand connect

Runs as a Leank client (and LSP server), connecting to a Leank server via an lspleank socket. The command following -- is used to start a Leank server if needed.

Subcommand lake

Runs as an LSP client to lake serve (and as an LSP server to the editor). The command following -- may be used as an alternative to lake serve. The command

lspleank lake

is functionally equivalent to

lspleank stdio -- lakelspout stdio

Subcommand stdio

Runs as a Leank client (and LSP server) and executes the command following -- as a stdio Leank server.

Lakelspout

Lakelspout is a Leank service/server. Editors use Leank clients such as lspleank or webleank to connect to lakelspout processes.

$ lakelspout -h
usage: lakelspout  [-h] [--version] {stdio} [-- lake_serve_command ...]

Adapt a Lake LSP server as a Leank service/server.

positional arguments:
  {stdio}
    stdio               run as a stdio Leank LSP server

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

Subcommand stdio

Runs as a Leank LSP server. By default, lake serve will be adapted. The optional command following -- can be used as an alternative to lake serve.

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

lspleanklib-0.3.1.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

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

lspleanklib-0.3.1-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file lspleanklib-0.3.1.tar.gz.

File metadata

  • Download URL: lspleanklib-0.3.1.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for lspleanklib-0.3.1.tar.gz
Algorithm Hash digest
SHA256 cad458b75a842c14d7ab6f4d428fe56b4b27efaa4a5f62cf226470eeff2ccac7
MD5 1d0848ed1671eb158c13b34be9ac2f2f
BLAKE2b-256 c23f4256510b5a57ef8ec31efd997961c59444bd68c020ae7e52dd095fd8b794

See more details on using hashes here.

File details

Details for the file lspleanklib-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: lspleanklib-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for lspleanklib-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 512938005e6c5928056f5e873ed2faad14a4f19e01c529f8605d6b01a274aa40
MD5 278e0c610372c7bfbc44732b6257f19e
BLAKE2b-256 a1244ab8d3118d7979dee1d941de0955c43ad02cd323946cfd0846fef9024e2c

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