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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b154035d9c40e1574ab59f32a68627bf09e1da03cc75b0a8262cdee6bd3c9c1 |
|
MD5 | 8e5a616066a51b0792775468fb40d7bd |
|
BLAKE2b-256 | 9abf573ca6c94281237a3345a123feb18d20d62e617eeae8e35018fb8e04ca27 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 302bbd18459e9a7048ba0728980a8682b29270c3e1678d34f1fad86997527ffc |
|
MD5 | 8e578bbc5fce0569b4e504444212e37d |
|
BLAKE2b-256 | c556c7a09f92cc0a234b45cfadbe4720452d53d368148512d5c3412c16b58433 |