diff --git a/README.md b/README.md index f7e6b78..27e1919 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![PyPI](https://img.shields.io/pypi/v/pyls-black.svg)](https://pypi.org/project/pyls-black/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) -> [Black](https://github.com/ambv/black) plugin for the [Python Language Server](https://github.com/palantir/python-language-server). +> [Black](https://github.com/ambv/black) plugin for the [Python LSP Server](https://github.com/python-lsp/python-lsp-server). -In the same `virtualenv` as `python-language-server`: +In the same `virtualenv` as `python-lsp-server`: ```shell pip3 install pyls-black diff --git a/pyls_black/plugin.py b/pyls_black/plugin.py index 407802f..8e6b3fe 100644 --- a/pyls_black/plugin.py +++ b/pyls_black/plugin.py @@ -2,16 +2,16 @@ import black import toml -from pyls import hookimpl +from pylsp import hookimpl @hookimpl(tryfirst=True) -def pyls_format_document(document): +def pylsp_format_document(document): return format_document(document) @hookimpl(tryfirst=True) -def pyls_format_range(document, range): +def pylsp_format_range(document, range): range["start"]["character"] = 0 range["end"]["line"] += 1 range["end"]["character"] = 0 diff --git a/setup.cfg b/setup.cfg index 93899b8..6e32451 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ classifiers = [options] packages = find: -install_requires = python-language-server; black>=19.3b0; toml +install_requires = python-lsp-server; black>=19.3b0; toml python_requires = >= 3.6 [options.entry_points] diff --git a/tests/test_plugin.py b/tests/test_plugin.py index f943b16..3c9c1c9 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -5,8 +5,8 @@ import black import pkg_resources import pytest -from pyls import uris -from pyls.workspace import Document, Workspace +from pylsp import uris +from pylsp.workspace import Document, Workspace from pyls_black.plugin import load_config, pyls_format_document, pyls_format_range