Skip to content

Commit 790e76c

Browse files
authored
add json config
1 parent 9117709 commit 790e76c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ file is present in the project, `python-lsp-ruff` will ignore specific options (
4040
The plugin follows [python-lsp-server's configuration](https://github.com/python-lsp/python-lsp-server/#configuration).
4141
This example configuration using for `neovim` shows the possible options:
4242

43+
<details open>
44+
<summary>Lua</summary>
45+
4346
```lua
4447
pylsp = {
4548
plugins = {
@@ -66,6 +69,42 @@ pylsp = {
6669
}
6770
}
6871
```
72+
</details>
73+
74+
<details>
75+
<summary>JSON</summary>
76+
77+
```
78+
{
79+
"pylsp": {
80+
"plugins": {
81+
"ruff": {
82+
"enabled": true,
83+
"formatEnabled": true,
84+
"executable": "<path-to-ruff-bin>",
85+
"config": "<path_to_custom_ruff_toml>",
86+
"extendSelect": [ "I" ],
87+
"extendIgnore": [ "C90"],
88+
"format": [ "I" ],
89+
"severities": {
90+
"D212": "I"
91+
},
92+
"unsafeFixes": false,
93+
"lineLength": 88,
94+
"exclude": ["__about__.py"],
95+
"select": ["F"],
96+
"ignore": ["D210"],
97+
"perFileIgnores": {
98+
"__init__.py": "CPY001"
99+
},
100+
"preview": false,
101+
"targetVersion": "py310"
102+
}
103+
}
104+
}
105+
}
106+
```
107+
</details>
69108

70109
For more information on the configuration visit [Ruff's homepage](https://beta.ruff.rs/docs/configuration/).
71110

0 commit comments

Comments
 (0)