Skip to content

Commit 69dd6a3

Browse files
committed
update README, add urls to pyproject.toml
1 parent f767ea9 commit 69dd6a3

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# python-lsp-ruff
2+
3+
[![PyPi](https://img.shields.io/pypi/v/python-lsp-ruff.svg)](https://pypi.org/project/python-lsp-ruff/1.0.0/)
4+
[![Python](https://github.com/python-lsp/python-lsp-ruff/actions/workflows/python.yml/badge.svg)](https://github.com/python-lsp/python-lsp-ruff/actions/workflows/python.yml)
5+
26
Linter plugin for pylsp based using ruff.
7+
Formatting via `ruff`'s `--fix` option will be available soon.
8+
9+
## Install
10+
11+
In the same `virtualenv` as `python-lsp-server`:
12+
13+
```shell
14+
pip install python-lsp-ruff
15+
```
16+
17+
# Usage
18+
19+
This plugin will disable `flake8` and `pycodestyle` by default.
20+
When enabled, all linting diagnostics will be provided by `ruff`.
21+
22+
# Configuration
23+
24+
Configuration options can be passed to the python-language-server. If a `pyproject.toml`
25+
file is present in the project, `python-lsp-ruff` will use these configuration options.
26+
27+
The plugin follows [python-lsp-server's
28+
configuration](https://github.com/python-lsp/python-lsp-server/#configuration). These are
29+
the valid configuration keys:
30+
31+
- `pylsp.plugins.ruff.enabled`: boolean to enable/disable the plugin. `true` by default.
32+
- `pylsp.plugins.ruff.config`: Path to optional `pyproject.toml` file.
33+
- `pylsp.plugins.ruff.exclude`: Exclude files from being checked by `ruff`.
34+
- `pylsp.plugins.ruff.executable`: Path to the `ruff` executable. Assumed to be in PATH by default.
35+
- `pylsp.plugins.ruff.ignore`: Error codes to ignore.
36+
- `pylsp.plugins.ruff.lineLength`: Set the line-length for length checks.
37+
- `pylsp.plugins.ruff.perFileIgnores`: File-specific error codes to be ignored.
38+
- `pylsp.plugins.ruff.select`: List of error codes to enable.

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ dev = ["pytest", "pre-commit"]
2424
[project.entry-points.pylsp]
2525
pylsp_ruff = "pylsp_ruff.ruff_lint"
2626

27+
[project.urls]
28+
"Homepage" = "https://github.com/python-lsp/python-lsp-ruff"
29+
"Bug Tracker" = "https://github.com/python-lsp/python-lsp-ruff/issues"
30+
2731
[tool.pytest.ini_options]
2832
pythonpath = ["."]
2933

0 commit comments

Comments
 (0)