Skip to content

Commit a5ded4d

Browse files
committed
Update documents.
1 parent 7754ca3 commit a5ded4d

File tree

3 files changed

+9
-124
lines changed

3 files changed

+9
-124
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

AUTHORS.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,21 @@
11
# python-lsp-isort
22

3-
isort plugin for the Python LSP Server
3+
[isort](https://github.com/PyCQA/isort) plugin for the [Python LSP Server](https://github.com/python-lsp/python-lsp-server).
44

5-
This is a plugin for [Python LSP Server](https://github.com/python-lsp/python-lsp-server).
5+
## Install
66

7-
## Installation
7+
In the same `virtualenv` as `python-lsp-server`:
88

9-
To use this plugin, you need to install this plugin in the same virtualenv as python-lsp-server itself.
10-
11-
``` bash
9+
```shell
1210
pip install python-lsp-isort
1311
```
1412

15-
Then run `python-lsp-server` as usual, the plugin will be auto-discovered by
16-
`python-lsp-server` if you've installed it to the right environment. Refer to
17-
`python-lsp-server` and your IDE/text editor documentation on how to setup
18-
`python-lsp-server`.
19-
2013
## Configuration
2114

22-
... TODO ...
23-
24-
## Features
25-
26-
This plugin adds the following features to `pylsp`:
27-
28-
- ... TODO ...
29-
30-
## Developing
31-
32-
Install development dependencies with (you might want to create a virtualenv first):
33-
34-
``` bash
35-
git clone https://github.com/chantera/python-lsp-isort python-lsp-isort
36-
cd python-lsp-isort
37-
pip install -e '.[dev]'
38-
```
39-
40-
### Enabling logging
41-
42-
To enable logging in pylsp:
43-
44-
pylsp -v --log-file /tmp/pylsp.log
45-
46-
### Enabling tcp mode
47-
48-
Normally, editors communicate with language servers through standard
49-
input/output. Optionally, you can run pylsp in tcp mode if you want to be able
50-
to use the standard input/output, for example so you can use IPython or pudb,
51-
using the --tcp flag:
52-
53-
pylsp -v --log-file /tmp/pylsp.log --tcp --port 7090
54-
55-
Consult your lsp client documentation on how to connect to tcp-mode language
56-
server, but if it doesn't support connecting to a language server via TCP, then
57-
usually can configure `netcat`/`nc` to be your "language server" that will
58-
proxy requests to a tcp-mode language server:
59-
60-
nc localhost 7090
61-
62-
TODO: document how to connect to pylsp via pylsp from LSP clients.
63-
### Testing
64-
65-
Run `pytest` to run plugin tests.
66-
67-
68-
## Publishing
69-
70-
If this is your first time publishing to PyPI, follow the instruction at [Twine
71-
docs](https://packaging.python.org/guides/distributing-packages-using-setuptools/#create-an-account)
72-
to create an PyPI account and setup Twine.
73-
74-
1. Update version number in `setup.cfg`.
75-
76-
2. Build a package using setuptools:
77-
78-
``` bash
79-
python -m build
80-
twine check dist/*
81-
```
82-
83-
3. Tag the release:
84-
85-
```
86-
git tag --sign 0.1.3
87-
git push origin 0.1.3
88-
```
89-
90-
4. Then upload using Twine:
91-
92-
```
93-
twine upload --sign dist/*
94-
```
95-
96-
Alternatively, you may want to upload to Test PyPI first before going live:
97-
98-
```
99-
twine upload --repository testpypi dist/*
100-
```
15+
The plugin follows [python-lsp-server's configuration](https://github.com/python-lsp/python-lsp-server/#configuration).
16+
These are the valid configuration keys:
10117

102-
## Credits
18+
- `pylsp.plugins.isort.enabled`: boolean to enable/disable the plugin. `true` by default.
19+
- `pylsp.plugins.isort.*`: any other key-value pair under `pylsp.plugins.isort` is passed to `isort.settings.Config`. See the [reference](https://pycqa.github.io/isort/reference/isort/settings.html#config) for details.
10320

104-
This package was created with
105-
[Cookiecutter](https://github.com/audreyr/cookiecutter) from
106-
[python-lsp/cookiecutter-pylsp-plugin](https://github.com/python-lsp/cookiecutter-pylsp-plugin)
107-
project template.
21+
Note that any configurations passed to isort via `pylsp` will override the settings in a config file, such as `pyproject.toml`.

0 commit comments

Comments
 (0)