Skip to content

Commit

Permalink
textproc/py-python-lsp-black: New port: Black plugin for the Python L…
Browse files Browse the repository at this point in the history
…SP Server
  • Loading branch information
yurivict committed Oct 13, 2022
1 parent 586b19a commit a373e0d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions textproc/Makefile
Expand Up @@ -1459,6 +1459,7 @@
SUBDIR += py-python-docs-theme
SUBDIR += py-python-docx
SUBDIR += py-python-gettext
SUBDIR += py-python-lsp-black
SUBDIR += py-python-lsp-jsonrpc
SUBDIR += py-python-lsp-server
SUBDIR += py-python-markdown-math
Expand Down
20 changes: 20 additions & 0 deletions textproc/py-python-lsp-black/Makefile
@@ -0,0 +1,20 @@
PORTNAME= python-lsp-black
DISTVERSION= 1.2.1
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= yuri@FreeBSD.org
COMMENT= Black plugin for the Python LSP Server
WWW= https://github.com/python-lsp/python-lsp-black

LICENSE= MIT

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-lsp-server>=1.4.0:textproc/py-python-lsp-server@${PY_FLAVOR}

USES= python:3.7+
USE_PYTHON= distutils autoplist pytest

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions textproc/py-python-lsp-black/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1665679561
SHA256 (python-lsp-black-1.2.1.tar.gz) = d7eaeab2a377e96a82cc26afe2f8f2e1cf7c6eaefdcdeab026343e2e559dcce9
SIZE (python-lsp-black-1.2.1.tar.gz) = 5392
15 changes: 15 additions & 0 deletions textproc/py-python-lsp-black/pkg-descr
@@ -0,0 +1,15 @@
Black plugin for the Python LSP Server.

* This plugin will disable the yapf and autopep8 plugins if installed.
* python-lsp-black can either format an entire file or just the selected text.
* The code will only be formatted if it is syntactically valid Python.
* Text selections are treated as if they were a separate Python file.
Unfortunately this means you can't format an indented block of code.
* python-lsp-black will use your project's pyproject.toml if it has one.
* python-lsp-black only officially supports the latest stable version of
black. An effort is made to keep backwards-compatibility but older black
versions will not be actively tested.
* The plugin can cache the black configuration that applies to each Python file,
this improves performance of the plugin. When configuration caching is
enabled any changes to black's configuration will need the LSP server to be
restarted. Configuration caching can be disabled with the cache_config option.

0 comments on commit a373e0d

Please sign in to comment.