Skip to main content

Black-macchiato plugin for the Python Language Server

Project description

Black-macchiato plugin for the Python Language Server (pyls)

To use the black code formatter with pyls, in most cases you can just use the pyls-black plugin. This plugin serves as an alternative if you need the ability to do range formatting.

Such functionality is provided by black-macchiato, while black only formats complete documents (see the black-macchiato readme for more background).

This plugin works similarly to pyls-black, but it uses the wrapping functionality from black-macchiato to enable formatting of (mostly) arbitrary ranges.

Configuration

Install this plugin into the same virtualenv as pyls. For example, on my system I am using vim-lsp and vim-lsp-settings, so I do the following:

$ ~/.local/share/vim-lsp-settings/servers/pyls/venv/bin/pip install pyls-black-macchiato

When formatting, the plugin will use logic similar to what's in black and pyls-black to search for a pyproject.toml and load its settings from there.

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

pyls-black-macchiato-0.1.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

pyls_black_macchiato-0.1.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file pyls-black-macchiato-0.1.3.tar.gz.

File metadata

  • Download URL: pyls-black-macchiato-0.1.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for pyls-black-macchiato-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5b154035d9c40e1574ab59f32a68627bf09e1da03cc75b0a8262cdee6bd3c9c1
MD5 8e5a616066a51b0792775468fb40d7bd
BLAKE2b-256 9abf573ca6c94281237a3345a123feb18d20d62e617eeae8e35018fb8e04ca27

See more details on using hashes here.

File details

Details for the file pyls_black_macchiato-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyls_black_macchiato-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for pyls_black_macchiato-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 302bbd18459e9a7048ba0728980a8682b29270c3e1678d34f1fad86997527ffc
MD5 8e578bbc5fce0569b4e504444212e37d
BLAKE2b-256 c556c7a09f92cc0a234b45cfadbe4720452d53d368148512d5c3412c16b58433

See more details on using hashes here.

Supported by

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