aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/py-python-lsp-black/Makefile20
-rw-r--r--textproc/py-python-lsp-black/distinfo3
-rw-r--r--textproc/py-python-lsp-black/pkg-descr15
4 files changed, 39 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 7fd1d840f6ea..8f8304f24f79 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -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
diff --git a/textproc/py-python-lsp-black/Makefile b/textproc/py-python-lsp-black/Makefile
new file mode 100644
index 000000000000..1f352e7416f1
--- /dev/null
+++ b/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>
diff --git a/textproc/py-python-lsp-black/distinfo b/textproc/py-python-lsp-black/distinfo
new file mode 100644
index 000000000000..1bf0f460b0d3
--- /dev/null
+++ b/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
diff --git a/textproc/py-python-lsp-black/pkg-descr b/textproc/py-python-lsp-black/pkg-descr
new file mode 100644
index 000000000000..4250b463b235
--- /dev/null
+++ b/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.